Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README/ReleaseNotes/v638/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
* The `RooStats::HLFactory` class that was deprecated in ROOT 6.36 is now removed. It provided little advantage over using the RooWorkspace directly or any of the other higher-level frameworks that exist in the RooFit ecosystem.
* The build options `mysql`, `odbc` and `pgsql`, that were deprecated in ROOT 6.36, are now removed.

## Core Libraries
* Behavior change: when selecting a template instantiation for a dictionary, all the template arguments have to be fully defined - the forward declarations are not enough any more. The error prompted by the dictionary generator will be `Warning: Unused class rule: MyTemplate<MyFwdDeclaredClass>`.

## Math

### Minuit2
Expand Down
4 changes: 2 additions & 2 deletions core/dictgen/src/BaseSelectionRule.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ BaseSelectionRule::EMatchType BaseSelectionRule::Match(const clang::NamedDecl *d
return kName;
}
} else if (fHasNameAttribute) {
if (name_value == name) {
if (name_value == name && !decl->isInvalidDecl()) {
const_cast<BaseSelectionRule*>(this)->SetMatchFound(true);
return kName;
} else if (fCXXRecordDecl == nullptr ||
Expand All @@ -236,7 +236,7 @@ BaseSelectionRule::EMatchType BaseSelectionRule::Match(const clang::NamedDecl *d
= fHasFromTypedefAttribute ? nullptr : ROOT::TMetaUtils::ScopeSearch(name_value.c_str(), *fInterp,
true /*diagnose*/, nullptr);

if ( target ) {
if ( target && !target->isInvalidDecl()) {
const_cast<BaseSelectionRule*>(this)->fCXXRecordDecl = target;
} else {
// If the lookup failed, let's not try it again, so mark the value has invalid.
Expand Down
7 changes: 0 additions & 7 deletions interpreter/cling/lib/Interpreter/LookupHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,13 +698,6 @@ namespace cling {
TagDecl* TD = TagTy->getDecl();
if (TD) {
TheDecl = TD->getDefinition();
// NOTE: if (TheDecl) ... check for theDecl->isInvalidDecl()
if (TD && TD->isInvalidDecl()) {
printf("Warning: FindScope got an invalid tag decl\n");
}
if (TheDecl && TheDecl->isInvalidDecl()) {
printf("ERROR: FindScope about to return an invalid decl\n");
}
if (!TheDecl && instantiateTemplate) {

// Make sure it is not just forward declared, and
Expand Down
7 changes: 6 additions & 1 deletion roottest/root/meta/rootcling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,9 @@ ROOTTEST_ADD_TEST(ROOT10798
ROOTTEST_GENERATE_DICTIONARY(streamerInfoStdFunctionDict streamerInfoStdFunction.h LINKDEF streamerInfoStdFunction.xml)
ROOTTEST_ADD_TEST(streamerInfoStdFunction
MACRO streamerInfoStdFunction.C
DEPENDS ${GENERATE_DICTIONARY_TEST})
DEPENDS ${GENERATE_DICTIONARY_TEST})

# Issue #18982
ROOTTEST_ADD_TEST(selectTemplateInvalidArg
COMMAND ${ROOT_rootcling_CMD} -f selectTemplateInvalidArg.Dict.cc ${CMAKE_CURRENT_SOURCE_DIR}/selectTemplateInvalidArg.h ${CMAKE_CURRENT_SOURCE_DIR}/selectTemplateInvalidArg.LinkDef.h
ERRREF selectTemplateInvalidArg.ref)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class RtObj2<TNamed>+;

#endif
14 changes: 14 additions & 0 deletions roottest/root/meta/rootcling/selectTemplateInvalidArg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <TObject.h>

template <class T>
class RtObj2 : public T
{
public:
RtObj2() {}
RtObj2( const T & val ) : T(val) {}
ClassDefT(RtObj2,1)
} ;

ClassDefT2(RtObj2,T)

ClassImpT(RtObj2,T)
1 change: 1 addition & 0 deletions roottest/root/meta/rootcling/selectTemplateInvalidArg.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Warning: Unused class rule: RtObj2<TNamed>