Skip to content

Commit 233adfe

Browse files
Teemperorvgvassilev
authored andcommitted
Improved header file name check in TCling.
There are more header extensions than ".h" out there.
1 parent ceab91f commit 233adfe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/metacling/src/TClingCallbacks.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ void TClingCallbacks::InclusionDirective(clang::SourceLocation sLoc/*HashLoc*/,
100100
// or TH1F in presence of TH1F.h.
101101
// Strategy 2) is tried only if 1) fails.
102102

103-
if (!IsAutoloadingEnabled() || fIsAutoloadingRecursively || !FileName.endswith(".h")) return;
103+
bool isHeaderFile = FileName.endswith(".h") || FileName.endswith(".hxx") || FileName.endswith(".hpp");
104+
if (!IsAutoloadingEnabled() || fIsAutoloadingRecursively || !isHeaderFile)
105+
return;
104106

105107
std::string localString(FileName.str());
106108

0 commit comments

Comments
 (0)