Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Llvm16 #189

Closed
wants to merge 103 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
b3d8111
[ntuple] Use `ROOT::Experimental::EColumnType` namespace in inspector…
enirolf Nov 23, 2023
d78dcb7
[ntuple] Add `RNTupleInspector::GetPageSizeDistribution`
enirolf Nov 23, 2023
1a88d8f
[NFC][ntuple] Improve `RNTupleImporter` docs formatting
enirolf Nov 29, 2023
8159c23
[RF] RooFit code modernization
guitargeek Nov 30, 2023
a7e0d39
[RF] Apply `clang-tidy` suggestions also to header files
guitargeek Dec 1, 2023
9a062cc
[RF] Introduce `RooAbsCollection::addTyped()` method
guitargeek Dec 3, 2023
10510ed
[cling] Handle llvm::Errors correctly.
vgvassilev Jul 21, 2023
51c26e8
[cling] Correctly infer the SDKROOT.
vgvassilev Jul 21, 2023
7a0481b
[cling] test/Driver/CommandHistory.C: `env -u` also works on macOS.
Axel-Naumann Dec 5, 2023
e84a796
[cling] Provide fallback for LLVM_INCLUDE_DIRS
hahnjo Dec 5, 2023
dda0dab
[ntuple] add support for n-dim C arrays in EDMs
jblomer Dec 5, 2023
ce20d91
[ntuple] update specification (NFC)
jblomer Dec 5, 2023
7303b56
[ntuple] extend ndim array unit tests
jblomer Dec 6, 2023
f55b7fb
Explicitly set Vdt_ROOT when builtin_vdt was used for the build.
krasznaa Dec 5, 2023
3fcf2f1
Require CMP0074 to be NEW for ROOTConfig.cmake.
krasznaa Dec 5, 2023
f697f9a
Add RNTuple merger prototype
Oct 10, 2023
65f580b
Apply clang-format
Oct 13, 2023
1c3b43e
First set of review comments
Oct 25, 2023
868ca0e
Rework source to destination column id mapping logic and add new test…
Oct 27, 2023
ebb741e
Change merge function signature based on review comments
Oct 27, 2023
a5b38b2
Apply clang-format
Oct 27, 2023
514b632
Update collection of columns
Oct 30, 2023
31f7822
Add a test for merging vector types
Oct 31, 2023
d4b2f8d
Extend matching to include type and version in addition to name
Nov 3, 2023
fbe4e1d
Add a new test to check the behavior when merging fields w/ the same …
Nov 3, 2023
1fd0cfc
Implement Jakob's comments
Dec 5, 2023
9dfcf01
Apply clang-format
Dec 5, 2023
7d7afbc
[RF] Again skip overflow bins correctly in HistFactory in 2D and 3D case
guitargeek Dec 5, 2023
be343a6
[RF] Enable external roottest build
vepadulano Dec 6, 2023
529aea9
[RF] Promote `ROOFIT_MEMORY_SAFE_INTERFACES` to users in release notes
guitargeek Dec 5, 2023
61c2c87
[RF] Make `RooFFTConfPdf` also work if ROOT was built with `fftw3=OFF`
guitargeek Dec 4, 2023
6e7c1d2
[ntuple] Throw in RPageSinkBuf::CommitSealedPageImpl
hahnjo Nov 27, 2023
d7d2ed6
[ntuple] Use only one RPageStorage::fMetrics
hahnjo Nov 27, 2023
d49dd1f
[ntuple] Introduce RPagePersistentSink
hahnjo Nov 27, 2023
87fb76e
[ntuple] Move Commit implementations to RPagePersistentSink
hahnjo Nov 27, 2023
9087329
[ntuple] Avoid calling RPageSink::UpdateSchema from RPageSinkBuf
hahnjo Nov 27, 2023
5e2a185
[ntuple] Move descriptor building to RPagePersistentSink
hahnjo Nov 27, 2023
c423533
[ntuple] Move some data members into RPagePersistentSink
hahnjo Nov 27, 2023
9baa779
[ntuple] Move metric counters into RPagePersistentSink
hahnjo Nov 27, 2023
adbc885
[tmva][sofie] Add support for variable number of nodes and edges
lmoneta Nov 13, 2023
0aa6123
[tmva][sofie] Use RTensor<int> for the GNN edge index data
lmoneta Nov 28, 2023
e8dfde0
[tmva][sofie] Modify sofie_gnn.py test for changes in the GNN_Data fo…
lmoneta Dec 4, 2023
523c73f
[tmva][sofie] Fix failing GNN Python tutorial and dependency
lmoneta Dec 6, 2023
1d61e69
[ntuple] add chain support for RDF data source
jblomer Jul 26, 2023
c8d7750
[ntuple] improve RDF MT work scheduling
jblomer Nov 24, 2023
7ae722d
[ntuple] prevent per-range recreation of values
jblomer Nov 24, 2023
86923d3
[ntuple] fix handling of principal source in RDF source
jblomer Nov 24, 2023
03eac72
[ntuple] improve member documentation (NFC)
jblomer Dec 5, 2023
e148cc8
[ntuple] improve member documentation (NFC)
jblomer Dec 5, 2023
7f141b4
[ntuple, NFC] improve code comment of GetColumnReadersImpl()
jblomer Dec 5, 2023
51ecc56
[ntuple] rename RNTupleDS::REntryRange --> REntryRangeDS
jblomer Dec 5, 2023
62003cc
[ntuple] replace R__ASSERT by assert() in RDF DS
jblomer Dec 7, 2023
b3218e9
[ntuple] Add comments in RDF DS (NFC)
jblomer Dec 7, 2023
1feafbd
[ntuple] change RNTupleColumnReader::fEntryOffset from ULong64_t to L…
jblomer Dec 7, 2023
e50ff57
[ntuple] add RDF factory for datasource with chain
jblomer Dec 7, 2023
af5bd8a
[ntuple] add optional limits to file-based readv
jblomer Dec 2, 2023
d93ae2c
[io] query server for readv limits in xrd raw file
jblomer Dec 4, 2023
305487c
[io] white space fixes in RRawFileNetXNG
jblomer Dec 4, 2023
06cdb2a
Revert "[Cling] Simplify std::tuple/pair value printer"
Axel-Naumann Dec 8, 2023
1bdf9f9
[cling] Add docs how to build from the mono repo
vgvassilev Dec 9, 2023
d819795
Prepare for releasing cling v1.0
vgvassilev Dec 9, 2023
2d2f3d6
Bump cling version to 1.1~dev.
vgvassilev Dec 9, 2023
b254999
Import ROOT-llvm16-20231130-01
hahnjo Nov 30, 2023
cd9951b
[interpreter] Require LLVM 16
hahnjo Jul 10, 2023
3ba4c8d
[cling] TargetRegistry.h moved to MC/
hahnjo Jan 18, 2023
8022d26
[cling] llvm::Optional::hasValue was renamed to has_value
hahnjo Jul 10, 2023
501d5cd
[cling] LookupFile takes arguments as ConstSearchDirIterator
hahnjo Jan 18, 2023
6fc65a3
[cling] InclusionDirective takes an clang::OptionalFileEntryRef
hahnjo Jul 10, 2023
90bcb8c
[cling] Update ClingMemoryManager with llvm::Align
hahnjo Jul 10, 2023
5799642
[cling] Misc renamings and type changes
hahnjo Jul 10, 2023
7b35bea
[cling] Adapt arguments for updated APIs
hahnjo Jul 10, 2023
38a6d51
[cling] CompoundStmt::Create takes FPOptionsOverride
hahnjo Jan 20, 2023
6297e34
[cling] getQualifiedTemplateName takes a TemplateName
hahnjo Jan 20, 2023
f0c384b
[cling] SubstDefaultTemplateArgumentIfAvailable
hahnjo Jul 10, 2023
f7565c8
[cling] MultiLevelTemplateArgumentList
hahnjo Jul 10, 2023
14193c1
[cling] Some changes from JITEvaluatedSymbol to ExecutorAddr
hahnjo Jul 10, 2023
0f941db
[cling] Adapt and heavily simplify ClingJITLinkMemoryManager
hahnjo Mar 27, 2023
77923e3
[cling] Lexer does not expose getLangOpts() anymore
hahnjo Jan 18, 2023
adf1080
[cling] Update for new FileNotFound callback
hahnjo Jan 20, 2023
da5a315
[cling] Update InvocationOptions
hahnjo Jul 10, 2023
3aa522d
[cling] Resource directory based on major version only
hahnjo Jul 10, 2023
d3625db
[cling] Remove PMBuilder members
hahnjo Jul 10, 2023
53b7699
[cling] Set MSVolatile in LangOpts
hahnjo Jul 19, 2023
0511292
[cling] Misc adaptations for updated APIs
hahnjo Jul 10, 2023
bbc2454
[cling] Don't print name of EnumDecl if there is none
hahnjo Jul 10, 2023
3a4e4bf
[cling] Adapt to updated forgetDecl signature
hahnjo Jul 11, 2023
7df9357
[cling] Remove extension of legacy pass manager
hahnjo Jul 17, 2023
8316173
[cling] Update handling of ElaboratedType in GetFullyQualifiedType
hahnjo Jul 12, 2023
be0265b
[cling] Update registration of atexit handlers
hahnjo Jul 17, 2023
fa27874
[cling] Handle UsingType in GetPartiallyDesugaredType
hahnjo Jul 20, 2023
ee5dc2f
[cling] Handle ElaboratedType in ReSubstTemplateArg
hahnjo Jul 26, 2023
7ce120e
[cling] Desugar UnaryTransformType
hahnjo Oct 5, 2023
e2511a7
[win64] Disable Cling optimizations
hahnjo Aug 9, 2023
a576e42
[TCling] Prepend drive letter to absolute path
bellenot Sep 4, 2023
73f4b57
[cling] Avoid unloading Decls not found in DeclContext
hahnjo Sep 5, 2023
c4eb332
[cling] Fix preprocessor option parsing
hahnjo Aug 14, 2023
545cf24
[cling] Expect normalized alias option offload_device_only
hahnjo Aug 14, 2023
76d3bb8
[cling] Remove expected space before array brackets in tests
hahnjo Jul 21, 2023
48b686b
Update expected template names in TClingMethodInfoTests.cxx
hahnjo Jul 27, 2023
2f43384
[cling] Remove elaborated keyword from output checks
hahnjo Aug 8, 2023
b6177d4
[cling] Update expected error messages in tests
hahnjo Aug 8, 2023
149f87e
[cling] Update expected types in output checks
hahnjo Aug 8, 2023
ca8b88c
[cling] Expect additional error in Prompt/BlockComments.C
hahnjo Aug 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
76 changes: 76 additions & 0 deletions README/ReleaseNotes/v632/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The following people have contributed to this new version:

## Deprecation and Removal
- The RooFit legacy iterators are deprecated and will be removed in ROOT 6.34 (see section "RooFit libraries")
- Some memory-unsafe RooFit interfaces were removed

## Core Libraries

Expand All @@ -57,6 +58,81 @@ The following people have contributed to this new version:

## RooFit Libraries

### Compile your code with memory safe interfaces

If you define the `ROOFIT_MEMORY_SAFE_INTERFACES` preprocessor macro, the
RooFit interface changes in a way such that memory leaks are avoided.

The most prominent effect of this change is that many functions that used to
return an owning pointer (e.g., a pointer to an object that you need to
manually `delete`) are then returning a `std::unique_pt` for automatic memory
management.

For example this code would not compile anymore, because there is the rist that
the caller forgets to `delete params`:
```c++
RooArgSet * params = pdf.getParameters(nullptr);
```
If you wrap such return values in a `std::unique_ptr`, then your code will
compile both with and without memory safe interfaces:
```c++
std::unique_ptr<RooArgSet> params{pdf.getParameters(nullptr)};
```

Also some `virtual` RooFit functions like [RooAbsReal::createIntegral()](https://root.cern.ch/doc/master/classRooAbsReal.html#aff4be07dd6a131721daeeccf6359aea9)
are returning a different type conditional on `ROOFIT_MEMORY_SAFE_INTERFACES`.
If you are overriding such a function, you need to use the `RooFit::OwningPtr`
return type, which is an alias for `std::unique_ptr` in memory-safe mode or an
alias for a raw pointer otherwise.
```c++
RooFit::OwningPtr<RooAbsReal> RooAbsReal::createIntegral(...) const override
{
std::unique_ptr<RooAbsReal> integral;
// Prepare a std::unique_ptr as the return value
...
// Use the RooFit::makeOwningPtr<T>() helper to translate the
// std::unique_ptr to the actual return type (either std::unique_ptr<T> or T*).
return RooFit::makeOwningPtr<RooAbsReal>(std::move(integral));
}
```

The biggest application of the memory-safe interfaces is to spot memory leaks
in RooFit-based frameworks. If you make sure that your framework compiles both
with and without `ROOFIT_MEMORY_SAFE_INTERFACES`, you can get rid of all memory
leaks related to RooFit user error! After making the necessary changes, you can
remove the marco definition again to keep backwards compatibility.

Note that the memory-safe interfaces might become the default at some point, so
doing this **backwards-compatible migration early** is strongly encouraged and
appreciated.

### Removal of some memory-unsafe interfaces

* The final `bool takeOwnership` parameter of the **RooAddition** and
**RooStats::HistFactory::PiecewiseInterpolation** constructors was removed.
This is to avoid situations where ownership is not clear to the compiler.
Now, ownership of the input RooAbsArgs is never passed in the constructor. If
you want the pass input ownership to the created object, please use
`addOwnedComponents`. If you want to be extra safe, make sure the inputs are
in an owning collection and then `std::move` the collection, so that the
ownership is always clear.

Example:
```c++
RooArgList sumSet;
sumSet.add(*(new RooRealVar("var1", "var1", 1.0)));
sumSet.add(*(new RooRealVar("var2", "var2", 3.0)));
RooAddition addition{"addition", "addition", sumSet, /*takeOwnership=*/true};
```
should become:
```c++
RooArgList sumSet;
sumSet.addOwned(std::make_unique<RooRealVar>("var1", "var1", 1.0));
sumSet.addOwned(std::make_unique<RooRealVar>("var2", "var2", 3.0));
RooAddition addition{"addition", "addition", sumSet};
addition.addOwnedComponents(std::move(sumSet));
```

### Deprecation of legacy iterators

The following methods related to the RooFit legacy iterators are deprecated and will be removed in ROOT 6.34.
Expand Down
11 changes: 3 additions & 8 deletions bindings/pyroot/pythonizations/test/sofie_gnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ def test_a_parse_gnn(self):
input_data.node_data = ROOT.TMVA.Experimental.AsRTensor(GraphData['nodes'])
input_data.edge_data = ROOT.TMVA.Experimental.AsRTensor(GraphData['edges'])
input_data.global_data = ROOT.TMVA.Experimental.AsRTensor(GraphData['globals'])
input_data.receivers = GraphData['receivers']
input_data.senders = GraphData['senders']
input_data.edge_index = ROOT.TMVA.Experimental.AsRTensor(np.stack((GraphData['receivers'],GraphData['senders'])))

session = ROOT.TMVA_SOFIE_gnn_network.Session()
session.infer(input_data)
Expand Down Expand Up @@ -192,8 +191,7 @@ def test_b_parse_graph_independent(self):
input_data.node_data = ROOT.TMVA.Experimental.AsRTensor(GraphData['nodes'])
input_data.edge_data = ROOT.TMVA.Experimental.AsRTensor(GraphData['edges'])
input_data.global_data = ROOT.TMVA.Experimental.AsRTensor(GraphData['globals'])
input_data.receivers = GraphData['receivers']
input_data.senders = GraphData['senders']
input_data.edge_index = ROOT.TMVA.Experimental.AsRTensor(np.stack((GraphData['receivers'],GraphData['senders'])))

session = ROOT.TMVA_SOFIE_graph_independent_network.Session()
session.infer(input_data)
Expand Down Expand Up @@ -273,11 +271,8 @@ def test_c_lhcb_toy_inference(self):
input_data.node_data = ROOT.TMVA.Experimental.AsRTensor(InputGraphData['nodes'])
input_data.edge_data = ROOT.TMVA.Experimental.AsRTensor(InputGraphData['edges'])
input_data.global_data = ROOT.TMVA.Experimental.AsRTensor(InputGraphData['globals'])
input_data.receivers = InputGraphData['receivers']
input_data.senders = InputGraphData['senders']
input_data.edge_index = ROOT.TMVA.Experimental.AsRTensor(np.stack((InputGraphData['receivers'],InputGraphData['senders'])))

print ("input receivers",input_data.receivers)
print ("input senders",input_data.senders)

output_gn = ep_model(input_graphs, 2)

Expand Down
11 changes: 11 additions & 0 deletions cmake/scripts/ROOTConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
#
# ===========================================================================

# Set any policies required by this module. Note that there is no check for
# whether a given policy exists or not. If it is required, it is required...
cmake_policy(PUSH)
cmake_policy(SET CMP0074 NEW)

#----------------------------------------------------------------------------
# DEBUG : print out the variables passed via find_package arguments
#
Expand Down Expand Up @@ -108,6 +113,9 @@ if(ROOT_minuit2_omp_FOUND)
find_dependency(Threads)
endif()
if(ROOT_vdt_FOUND AND NOT TARGET VDT::VDT)
if(ROOT_builtin_vdt_FOUND)
set(Vdt_ROOT "${_thisdir}/.." CACHE PATH "Location of (the builtin) VDT")
endif()
find_dependency(Vdt)
endif()

Expand Down Expand Up @@ -166,3 +174,6 @@ foreach(_remaining ${ROOT_FIND_COMPONENTS})
endif()
unset(ROOT_FIND_REQUIRED_${_remaining})
endforeach()

# Clear out any policy settings made for this module.
cmake_policy(POP)
2 changes: 1 addition & 1 deletion core/clingutils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ endforeach()
set(CLANG_RESOURCE_DIR_STEM)
if (builtin_clang)
set(CLANG_RESOURCE_DIR_STEM ${CMAKE_BINARY_DIR}/interpreter/llvm-project/llvm/${CMAKE_CFG_INTDIR}/lib/clang)
set(CLANG_RESOURCE_DIR_VERSION ${LLVM_VERSION})
set(CLANG_RESOURCE_DIR_VERSION ${LLVM_VERSION_MAJOR})
else ()
set(CLANG_RESOURCE_DIR_STEM ${LLVM_LIBRARY_DIR}/clang)
# A user can define a clang version to use, otherwise find it (but will error if more than one version is present)
Expand Down
26 changes: 17 additions & 9 deletions core/clingutils/src/TClingUtils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2936,6 +2936,7 @@ clang::QualType ROOT::TMetaUtils::AddDefaultParameters(clang::QualType instanceT
unsigned int dropDefault = normCtxt.GetConfig().DropDefaultArg(*Template);

llvm::SmallVector<clang::TemplateArgument, 4> desArgs;
llvm::SmallVector<clang::TemplateArgument, 4> canonArgs;
llvm::ArrayRef<clang::TemplateArgument> template_arguments = TST->template_arguments();
unsigned int Idecl = 0, Edecl = TSTdecl->getTemplateArgs().size();
unsigned int maxAddArg = TSTdecl->getTemplateArgs().size() - dropDefault;
Expand All @@ -2962,7 +2963,10 @@ clang::QualType ROOT::TMetaUtils::AddDefaultParameters(clang::QualType instanceT
desArgs.push_back(*I);
continue;
}
clang::TemplateName templateNameWithNSS ( Ctx.getQualifiedTemplateName(nns, false, templateDecl) );
clang::TemplateName UnderlyingTN(templateDecl);
if (clang::UsingShadowDecl *USD = templateName.getAsUsingShadowDecl())
UnderlyingTN = clang::TemplateName(USD);
clang::TemplateName templateNameWithNSS ( Ctx.getQualifiedTemplateName(nns, false, UnderlyingTN) );
desArgs.push_back(clang::TemplateArgument(templateNameWithNSS));
mightHaveChanged = true;
continue;
Expand Down Expand Up @@ -3017,6 +3021,7 @@ clang::QualType ROOT::TMetaUtils::AddDefaultParameters(clang::QualType instanceT
RAngleLoc,
TTP,
desArgs,
canonArgs,
HasDefaultArgs);
// The substition can fail, in which case there would have been compilation
// error printed on the screen.
Expand Down Expand Up @@ -3329,7 +3334,7 @@ std::string ROOT::TMetaUtils::GetFileName(const clang::Decl& decl,

const FileEntry *headerFE = sourceManager.getFileEntryForID(headerFID);
while (includeLoc.isValid() && sourceManager.isInSystemHeader(includeLoc)) {
const DirectoryLookup *foundDir = nullptr;
ConstSearchDirIterator *foundDir = nullptr;
// use HeaderSearch on the basename, to make sure it takes a header from
// the include path (e.g. not from /usr/include/bits/)
assert(headerFE && "Couldn't find FileEntry from FID!");
Expand Down Expand Up @@ -3378,7 +3383,7 @@ std::string ROOT::TMetaUtils::GetFileName(const clang::Decl& decl,
// points to the same file as the long version. If such a short version
// exists it will be returned. If it doesn't the long version is returned.
bool isAbsolute = llvm::sys::path::is_absolute(headerFileName);
llvm::Optional<clang::FileEntryRef> FELong;
clang::OptionalFileEntryRef FELong;
// Find the longest available match.
for (llvm::sys::path::const_iterator
IDir = llvm::sys::path::begin(headerFileName),
Expand All @@ -3394,7 +3399,7 @@ std::string ROOT::TMetaUtils::GetFileName(const clang::Decl& decl,
assert(trailingPart.data() + trailingPart.size()
== headerFileName.data() + headerFileName.size()
&& "Mismatched partitioning of file name!");
const DirectoryLookup* FoundDir = nullptr;
ConstSearchDirIterator* FoundDir = nullptr;
FELong = HdrSearch.LookupFile(trailingPart, SourceLocation(),
true /*isAngled*/, nullptr/*FromDir*/, FoundDir,
ArrayRef<std::pair<const FileEntry *, const DirectoryEntry *>>(),
Expand All @@ -3418,7 +3423,7 @@ std::string ROOT::TMetaUtils::GetFileName(const clang::Decl& decl,
assert(trailingPart.data() + trailingPart.size()
== headerFileName.data() + headerFileName.size()
&& "Mismatched partitioning of file name!");
const DirectoryLookup* FoundDir = nullptr;
ConstSearchDirIterator* FoundDir = nullptr;
// Can we find it, and is it the same file as the long version?
// (or are we back to the previously found spelling, which is fine, too)
if (HdrSearch.LookupFile(trailingPart, SourceLocation(),
Expand Down Expand Up @@ -3613,12 +3618,14 @@ static bool areEqualTypes(const clang::TemplateArgument& tArg,
{
clang::Sema& S = interp.getCI()->getSema();
cling::Interpreter::PushTransactionRAII clingRAII(const_cast<cling::Interpreter*>(&interp));
llvm::SmallVector<clang::TemplateArgument, 4> canonArgs;
bool HasDefaultArgs;
TemplateArgumentLoc defTArgLoc = S.SubstDefaultTemplateArgumentIfAvailable(Template,
TemplateLoc,
LAngleLoc,
ttpdPtr,
preceedingTArgs,
canonArgs,
HasDefaultArgs);
// The substition can fail, in which case there would have been compilation
// error printed on the screen.
Expand Down Expand Up @@ -4494,7 +4501,7 @@ static bool hasSomeTypedefSomewhere(const clang::Type* T) {
return false; // shrug...
}
bool VisitTypeOfType(const TypeOfType* TOT) {
return TOT->getUnderlyingType().getTypePtr();
return TOT->getUnmodifiedType().getTypePtr();
}
bool VisitElaboratedType(const ElaboratedType* ET) {
NestedNameSpecifier* NNS = ET->getQualifier();
Expand Down Expand Up @@ -4658,7 +4665,7 @@ clang::QualType ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType input, cons
// Make sure it got replaced from this template
const clang::ClassTemplateDecl *replacedCtxt = nullptr;

const clang::DeclContext *replacedDeclCtxt = substType->getReplacedParameter()->getDecl()->getDeclContext();
const clang::DeclContext *replacedDeclCtxt = substType->getReplacedParameter()->getDeclContext();
const clang::CXXRecordDecl *decl = llvm::dyn_cast<clang::CXXRecordDecl>(replacedDeclCtxt);
unsigned int index = substType->getReplacedParameter()->getIndex();
if (decl) {
Expand Down Expand Up @@ -4718,7 +4725,7 @@ clang::QualType ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType input, cons

if ((replacedCtxt && replacedCtxt->getCanonicalDecl() == TSTdecl->getSpecializedTemplate()->getCanonicalDecl())
|| /* the following is likely just redundant */
substType->getReplacedParameter()->getDecl()
substType->getReplacedParameter()
== TSTdecl->getSpecializedTemplate ()->getTemplateParameters()->getParam(index))
{
const auto &TAs = TST->template_arguments();
Expand Down Expand Up @@ -4753,7 +4760,8 @@ clang::QualType ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType input, cons

clang::QualType SubTy = TA.getAsType();
// Check if the type needs more desugaring and recurse.
if (llvm::isa<clang::SubstTemplateTypeParmType>(SubTy)
if (llvm::isa<clang::ElaboratedType>(SubTy)
|| llvm::isa<clang::SubstTemplateTypeParmType>(SubTy)
|| llvm::isa<clang::TemplateSpecializationType>(SubTy)) {
clang::QualType newSubTy = ReSubstTemplateArg(SubTy,instance);
mightHaveChanged = SubTy != newSubTy;
Expand Down
4 changes: 2 additions & 2 deletions core/dictgen/src/TModuleGenerator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TModuleGenerator::GetSourceFileKind(const char *filename) const
// via the FileManager.
clang::Preprocessor &PP = fCI->getPreprocessor();
clang::HeaderSearch &HdrSearch = PP.getHeaderSearchInfo();
const clang::DirectoryLookup *CurDir = nullptr;
clang::ConstSearchDirIterator *CurDir = nullptr;
auto hdrFileEntry
= HdrSearch.LookupFile(filename, clang::SourceLocation(),
true /*isAngled*/, nullptr /*FromDir*/, CurDir,
Expand Down Expand Up @@ -577,7 +577,7 @@ bool TModuleGenerator::FindHeader(const std::string &hdrName, std::string &hdrFu
}
clang::Preprocessor &PP = fCI->getPreprocessor();
clang::HeaderSearch &HdrSearch = PP.getHeaderSearchInfo();
const clang::DirectoryLookup *CurDir = nullptr;
clang::ConstSearchDirIterator *CurDir = nullptr;
if (auto hdrFileEntry
= HdrSearch.LookupFile(hdrName, clang::SourceLocation(),
true /*isAngled*/, nullptr /*FromDir*/, CurDir,
Expand Down
7 changes: 4 additions & 3 deletions core/dictgen/src/rootcling_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3494,7 +3494,7 @@ class TRootClingCallbacks : public cling::InterpreterCallbacks {

void InclusionDirective(clang::SourceLocation /*HashLoc*/, const clang::Token & /*IncludeTok*/,
llvm::StringRef FileName, bool IsAngled, clang::CharSourceRange /*FilenameRange*/,
const clang::FileEntry * /*File*/, llvm::StringRef /*SearchPath*/,
clang::OptionalFileEntryRef /*File*/, llvm::StringRef /*SearchPath*/,
llvm::StringRef /*RelativePath*/, const clang::Module * /*Imported*/,
clang::SrcMgr::CharacteristicKind /*FileType*/) override
{
Expand Down Expand Up @@ -3536,7 +3536,8 @@ class TRootClingCallbacks : public cling::InterpreterCallbacks {
Preprocessor& PP = m_Interpreter->getCI()->getPreprocessor();
HeaderSearch& HS = PP.getHeaderSearchInfo();
// FIXME: Reduce to Core.Rtypes.h.
Module* CoreModule = HS.lookupModule("Core", /*AllowSearch*/false);
Module* CoreModule = HS.lookupModule("Core", SourceLocation(),
/*AllowSearch*/false);
assert(M && "Must have module Core");
PP.makeModuleVisible(CoreModule, ImportLoc);
}
Expand Down Expand Up @@ -3892,7 +3893,7 @@ static bool ModuleContainsHeaders(TModuleGenerator &modGen, clang::HeaderSearch
continue;

clang::ModuleMap::KnownHeader SuggestedModule;
const clang::DirectoryLookup *CurDir = nullptr;
clang::ConstSearchDirIterator *CurDir = nullptr;
if (auto FE = headerSearch.LookupFile(
header, clang::SourceLocation(),
/*isAngled*/ false,
Expand Down
Loading