Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
69e7ceb
Import ROOT-llvm22
devajithvs Feb 27, 2026
e147d16
[cling][LLVM20] Misc adaptations for updated APIs
devajithvs Feb 27, 2026
47feaf9
[cling] Unload: TopLevelStmtDecl special casing
devajithvs Mar 11, 2026
e7ffdb8
[core][LLVM22] Adapt to LLVM 22 API changes
devajithvs Mar 5, 2026
f06d535
[cling][AST] Add utility function `QualifyTypeUnderPrefix`
devajithvs Jun 11, 2026
64b3b25
[cling][AST] Copy `QualTypeName.cpp` functions into `AST.cpp`
devajithvs Mar 5, 2026
2680b9a
[cling][LLVM22] All the NestedNameSpecifier changes
devajithvs Mar 3, 2026
f75ac89
[core][LLVM22] All NestedNameSpecifier changes
devajithvs Mar 12, 2026
58b9d77
[cling][AST] Add `getFullyQualifiedType` changes needed for cling
devajithvs Jun 12, 2026
b67ed2d
[cling][AST][Desugar] Strip AutoType early before the type-specific h…
devajithvs May 13, 2026
281f192
[cling][AST] PartialDesugaring: Fix loss of namespace prefix for TST
devajithvs Jun 15, 2026
a08938b
[cling][AST] Strip unnecessary global '::' qualifier for TemplateNames
devajithvs Apr 17, 2026
c4002e1
[cling][AST] Restore partial desugaring of global RecordType prefixes…
devajithvs Apr 10, 2026
6af3063
[cling][AST] Remove dead ElaboratedType code paths
devajithvs Jun 16, 2026
16a6bf1
[TClassEdit][REVISIT] Map `__size_t` and `__ptrdiff_t` aliases back t…
devajithvs Mar 24, 2026
cbe3f3e
[TCling][REVISIT] Strip tag keywords to handle LLVM22 elaborated type…
devajithvs Apr 1, 2026
e655e4d
[cling][test] Update output print types
devajithvs Mar 11, 2026
70e3468
[cling][test] Fix Transform test: populate m_toReplace for std::string
devajithvs Jun 15, 2026
f818887
[roottest] Update reference files after LLVM22
devajithvs Mar 20, 2026
98e8b7d
[roottest][meta] Update test-case to reflect what was written
devajithvs Apr 15, 2026
c750bab
[roottest] Adapt ResolveTypedef test for LLVM22 UsingType desugaring
devajithvs Apr 22, 2026
e641648
[cppyy] Unmark xfail, this test now passes with LLVM22
devajithvs Apr 20, 2026
2df3d0e
[cling] Enable SuppressTagKeywordInAnonNames by default
devajithvs Apr 10, 2026
6edc0d5
[cling][macos] Allow framework includes in System group in CopyInclud…
devajithvs May 13, 2026
b9a5a7e
[cling] Clear `UnsubstitutedConstraintSatisfactionCache` on unload
devajithvs May 19, 2026
8a6a12b
[cling] Suppress SFINAE diagnostics in InstantiateTemplateWithDefaults
devajithvs Jun 3, 2026
99e3794
[adaptivecpp] Turn off AdaptiveCpp temporarily
devajithvs Mar 23, 2026
db758f6
[clad] Disable clad temporarily
devajithvs Jun 23, 2026
095ecae
[CI][llvm-project] Only compare what is already there in third-party
devajithvs Jun 24, 2026
b7686e3
Update clad cmake
SahilPatidar May 26, 2026
8701053
[interpreter] Update `CLANG_CMAKE_DIR` after LLVM22 update
devajithvs Jul 2, 2026
a80f916
[cling] Use SuppressUnwrittenScope to strip anonymous namespace names
devajithvs Jul 3, 2026
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.
4 changes: 4 additions & 0 deletions .github/workflows/llvm-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
path: llvm-project
- name: Delete directories and files in llvm-project
working-directory: llvm-project
run: |

Check failure on line 29 in .github/workflows/llvm-diff.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

shellcheck reported issue in this script: SC2045:warning:9:10: Iterating over ls output is fragile. Use globs

Check failure on line 29 in .github/workflows/llvm-diff.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

shellcheck reported issue in this script: SC2045:warning:5:10: Iterating over ls output is fragile. Use globs
for d in bindings benchmark benchmarks gn test tests unittest unittests; do
find . -name $d -prune -exec rm -r "{}" \;
done
Expand All @@ -34,5 +34,9 @@
for f in $(ls -A); do
[ -e ../root/interpreter/llvm-project/$f ] || rm -r $f
done
# Only compare what is already there in third-party
for f in $(ls -A third-party); do
[ -e ../root/interpreter/llvm-project/third-party/$f ] || rm -r third-party/$f
done
- name: Compare
run: diff -ur llvm-project/ root/interpreter/llvm-project/
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CMAKE_CXX_STANDARD=23
experimental_adaptivecpp=ON
experimental_adaptivecpp=OFF
pythia8=ON
roofit_multiprocess=ON
test_distrdf_dask=OFF
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CMAKE_CXX_STANDARD=23
experimental_adaptivecpp=ON
experimental_adaptivecpp=OFF
pythia8=ON
roofit_multiprocess=ON
test_distrdf_pyspark=OFF
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CMAKE_BUILD_TYPE=RelWithDebInfo
cuda=ON
experimental_adaptivecpp=ON
experimental_genvectorx=ON
experimental_adaptivecpp=OFF
experimental_genvectorx=OFF
gdml=OFF
spectrum=OFF
sqlite=OFF
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/root-ci-config/buildconfig/ubuntu2404.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
experimental_adaptivecpp=ON
experimental_genvectorx=ON
experimental_adaptivecpp=OFF
experimental_genvectorx=OFF
1 change: 0 additions & 1 deletion bindings/pyroot/cppyy/cppyy/test/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ def test13_using_templated_method(self):
assert type(d.get3()) == int
assert d.get3() == 5

@mark.xfail(strict=True)
def test14_templated_return_type(self):
"""Use of a templated return type"""

Expand Down
3 changes: 2 additions & 1 deletion core/clingutils/res/TClingUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ namespace clang {
class Type;
class TypeDecl;
class TypedefNameDecl;
enum class ElaboratedTypeKeyword;
struct PrintingPolicy;
}

Expand Down Expand Up @@ -754,7 +755,7 @@ clang::QualType ReSubstTemplateArg(clang::QualType input, const clang::Type *ins
int RemoveTemplateArgsFromName(std::string& name, unsigned int);

//______________________________________________________________________________
clang::TemplateName ExtractTemplateNameFromQualType(const clang::QualType& qt);
void ExtractTemplateNameFromQualType(const clang::QualType& qt, clang::TemplateName& theTemplateName, clang::ElaboratedTypeKeyword& theKeyword);

//______________________________________________________________________________
bool QualType2Template(const clang::QualType& qt,
Expand Down
200 changes: 90 additions & 110 deletions core/clingutils/src/TClingUtils.cxx

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions core/dictgen/src/DictSelectionReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ bool DictSelectionReader::FirstPass(const clang::RecordDecl &recordDecl)
{
std::string className;
ROOT::TMetaUtils::GetQualifiedName(
className, *recordDecl.getTypeForDecl(), recordDecl);
className, recordDecl.getASTContext().getCanonicalTagType(&recordDecl), recordDecl);

// Strip ROOT::Meta::Selection
className.replace(0, 23, "");
Expand Down Expand Up @@ -312,7 +312,7 @@ bool DictSelectionReader::SecondPass(const clang::RecordDecl &recordDecl)
if (InSelectionNamespace(recordDecl)) return true;

std::string className;
GetQualifiedName(className, *recordDecl.getTypeForDecl(), recordDecl);
GetQualifiedName(className, recordDecl.getASTContext().getCanonicalTagType(&recordDecl), recordDecl);

// If the class is not among those which have fields the type of which are to
// be autoselected or excluded
Expand Down
10 changes: 5 additions & 5 deletions core/dictgen/src/Scanner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ int RScanner::AddAnnotatedRecordDecl(const ClassSelectionRule* selected,
0 != ROOT::TMetaUtils::GetClassVersion(recordDecl,fInterpreter)) {
std::string normName;
TMetaUtils::GetNormalizedName(normName,
recordDecl->getASTContext().getTypeDeclType(recordDecl),
recordDecl->getASTContext().getCanonicalTagType(recordDecl),
fInterpreter,
fNormCtxt);
ROOT::TMetaUtils::Error(nullptr,"Union %s has been selected for I/O. This is not supported. Interactive usage of unions is supported, as all C++ entities, without the need of dictionaries.\n",normName.c_str());
Expand Down Expand Up @@ -586,7 +586,7 @@ int RScanner::AddAnnotatedRecordDecl(const ClassSelectionRule* selected,
GetDeclQualName(recordDecl,qual_name);
std::string normName;
TMetaUtils::GetNormalizedName(normName,
recordDecl->getASTContext().getTypeDeclType(recordDecl),
recordDecl->getASTContext().getCanonicalTagType(recordDecl),
fInterpreter,
fNormCtxt);
std::string typedef_qual_name;
Expand Down Expand Up @@ -740,7 +740,7 @@ bool RScanner::TreatRecordDeclOrTypedefNameDecl(clang::TypeDecl* typeDecl)
declSelRuleMapIt->second != selected) {
std::string normName;
TMetaUtils::GetNormalizedName(normName,
recordDecl->getASTContext().getTypeDeclType(recordDecl),
recordDecl->getASTContext().getCanonicalTagType(recordDecl),
fInterpreter,
fNormCtxt);

Expand Down Expand Up @@ -781,7 +781,7 @@ bool RScanner::TreatRecordDeclOrTypedefNameDecl(clang::TypeDecl* typeDecl)
if (!isFileSelection) {
std::string normName;
TMetaUtils::GetNormalizedName(normName,
recordDecl->getASTContext().getTypeDeclType(recordDecl),
recordDecl->getASTContext().getCanonicalTagType(recordDecl),
fInterpreter,
fNormCtxt);
auto msg = "Class or struct %s was selected but its dictionary cannot be generated: "
Expand Down Expand Up @@ -817,7 +817,7 @@ void RScanner::AddDelayedAnnotatedRecordDecls()
for (auto &&info: fDelayedAnnotatedRecordDecls) {
const clang::Type *thisType = info.fSelected->GetRequestedType();
if (!thisType)
thisType = info.fDecl->getTypeForDecl();
thisType = info.fDecl->getASTContext().getCanonicalTagType(info.fDecl)->getTypePtr();
const clang::CXXRecordDecl *recordDecl = info.fDecl;
auto nameTypeForIO = ROOT::TMetaUtils::GetNameTypeForIO(clang::QualType(thisType, 0), fInterpreter, fNormCtxt);
auto typeForIO = nameTypeForIO.second;
Expand Down
10 changes: 7 additions & 3 deletions core/dictgen/src/rootcling_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1869,7 +1869,7 @@ static bool WriteAST(llvm::StringRef fileName, clang::CompilerInstance *compiler
// From PCHGenerator and friends:
llvm::SmallVector<char, 128> buffer;
llvm::BitstreamWriter stream(buffer);
clang::ASTWriter writer(stream, buffer, compilerInstance->getModuleCache(), /*Extensions=*/{});
clang::ASTWriter writer(stream, buffer, compilerInstance->getModuleCache(), compilerInstance->getCodeGenOpts(), /*Extensions=*/{});
std::unique_ptr<llvm::raw_ostream> out =
compilerInstance->createOutputFile(fileName, /*Binary=*/true,
/*RemoveFileOnSignal=*/false,
Expand Down Expand Up @@ -4305,9 +4305,13 @@ int RootClingMain(int argc,
ROOT::TMetaUtils::Info(nullptr, "== Language Options\n");
const clang::LangOptions& LangOpts
= interp.getCI()->getASTContext().getLangOpts();
#define LANGOPT(Name, Bits, Default, Description) \

// FIXME: Replace with C++20 `using enum LangOptions::CompatibilityKind`.
using CK = clang::LangOptions::CompatibilityKind;
#define LANGOPT(Name, Bits, Default, Compatibility, Description) \
if constexpr (CK::Compatibility != CK::Benign) \
ROOT::TMetaUtils::Info(nullptr, "%s = %d // %s\n", #Name, (int)LangOpts.Name, Description);
#define ENUM_LANGOPT(Name, Type, Bits, Default, Description)
#define ENUM_LANGOPT(Name, Type, Bits, Default, Compatibility, Description)
#include "clang/Basic/LangOptions.def"
ROOT::TMetaUtils::Info(nullptr, "==== END interpreter configuration ====\n\n");
}
Expand Down
5 changes: 5 additions & 0 deletions core/foundation/src/TClassEdit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ void TClassEdit::TSplitType::ShortType(std::string &answ, int mode)

// do the same for all inside
for (int i=1;i<narg; i++) {
if (fElements[i] == "__size_t") fElements[i] = "unsigned long";
else if (fElements[i] == "__ptrdiff_t") fElements[i] = "long";
if (!strchr(fElements[i].c_str(),'<')) {
if (mode&kResolveTypedef) {
fElements[i] = ResolveTypedef(fElements[i].c_str(),true);
Expand Down Expand Up @@ -896,6 +898,9 @@ void TClassEdit::GetNormalizedName(std::string &norm_name, std::string_view name

norm_name = std::string(name); // NOTE: Is that the shortest version?

if (norm_name == "__size_t") norm_name = "unsigned long";
else if (norm_name == "__ptrdiff_t") norm_name = "long";

if (TClassEdit::IsArtificial(name)) {
// If there is a @ symbol (followed by a version number) then this is a synthetic class name created
// from an already normalized name for the purpose of supporting schema evolution.
Expand Down
16 changes: 8 additions & 8 deletions core/metacling/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1970,7 +1970,7 @@ bool TCling::RegisterPrebuiltModulePath(const std::string &FullPath,
// We should look for modulemap files there too.
if (auto DE = FM.getOptionalDirectoryRef(FullPath)) {
HeaderSearch &HS = PP.getHeaderSearchInfo();
HeaderSearchOptions &HSOpts = HS.getHeaderSearchOpts();
HeaderSearchOptions &HSOpts = const_cast<HeaderSearchOptions&>(HS.getHeaderSearchOpts());
const auto &ModPaths = HSOpts.PrebuiltModulePaths;
bool pathExists = std::find(ModPaths.begin(), ModPaths.end(), FullPath) != ModPaths.end();
if (!pathExists)
Expand All @@ -1983,7 +1983,7 @@ bool TCling::RegisterPrebuiltModulePath(const std::string &FullPath,
llvm::sys::path::append(ModuleMapFileName, ModuleMapName);
if (auto FE = FM.getOptionalFileRef(ModuleMapFileName, /*openFile*/ false,
/*CacheFailure*/ false)) {
if (!HS.loadModuleMapFile(*FE, /*IsSystem*/ false))
if (!HS.parseAndLoadModuleMapFile(*FE, /*IsSystem*/ false))
return true;
Error("RegisterPrebuiltModulePath", "Could not load modulemap in %s", ModuleMapFileName.c_str());
}
Expand Down Expand Up @@ -5199,11 +5199,11 @@ void TCling::GetFunctionOverloads(ClassInfo_t *cl, const char *funcname,

if (RecDecl) {
if (RecDecl->getNameAsString() == funcname) {
clang::QualType QT = Ctx.getTypeDeclType(RecDecl);
DName = Ctx.DeclarationNames.getCXXConstructorName(Ctx.getCanonicalType(QT));
clang::CanQualType QT = Ctx.getCanonicalTagType(RecDecl);
DName = Ctx.DeclarationNames.getCXXConstructorName(QT);
} else if (funcname[0] == '~' && RecDecl->getNameAsString() == funcname + 1) {
clang::QualType QT = Ctx.getTypeDeclType(RecDecl);
DName = Ctx.DeclarationNames.getCXXDestructorName(Ctx.getCanonicalType(QT));
clang::CanQualType QT = Ctx.getCanonicalTagType(RecDecl);
DName = Ctx.DeclarationNames.getCXXDestructorName(QT);
} else {
DName = &Ctx.Idents.get(funcname);
}
Expand Down Expand Up @@ -6859,7 +6859,7 @@ void TCling::UpdateClassInfoWithDecl(const NamedDecl* ND)
return;
}

clang::QualType type(tdDef->getTypeForDecl(), 0);
clang::QualType type = tdDef->getASTContext().getCanonicalTagType(tdDef);
ROOT::TMetaUtils::GetNormalizedName(name, type, *fInterpreter, *fNormalizedCtxt);
} else if (ns) {
canon = ns->getCanonicalDecl();
Expand Down Expand Up @@ -8903,7 +8903,7 @@ static void ConstructorName(std::string &name, const clang::Decl *decl,
const clang::TypeDecl* td = llvm::dyn_cast<clang::TypeDecl>(decl->getDeclContext());
if (!td) return;

clang::QualType qualType(td->getTypeForDecl(),0);
clang::QualType qualType = td->getASTContext().getTypeDeclType(td);
ROOT::TMetaUtils::GetNormalizedName(name, qualType, interp, normCtxt);
unsigned int level = 0;
for(size_t cursor = name.length()-1; cursor != 0; --cursor) {
Expand Down
6 changes: 4 additions & 2 deletions core/metacling/src/TClingCallFunc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ EvaluateExpr(cling::Interpreter &interp, const Expr *E, cling::Value &V)
// compilation and other string operations.
PrintingPolicy Policy(C.getPrintingPolicy());
Policy.SuppressTagKeyword = true;
Policy.SuppressTagKeywordInAnonNames = true; // Skip printing tags for anonymous entities
Policy.SuppressUnwrittenScope = false;
Policy.SuppressInitializers = false;
Policy.AnonymousTagLocations = false;
Expand Down Expand Up @@ -157,10 +158,11 @@ static void GetDeclName(const clang::Decl *D, ASTContext &Context, std::string &

PrintingPolicy Policy(Context.getPrintingPolicy());
Policy.SuppressTagKeyword = true;
Policy.SuppressTagKeywordInAnonNames = true; // Skip printing tags for anonymous entities
Policy.SuppressUnwrittenScope = true;
if (const TypeDecl *TD = dyn_cast<TypeDecl>(D)) {
// This is a class, struct, or union member.
QualType QT(TD->getTypeForDecl(), 0);
QualType QT = TD->getASTContext().getTypeDeclType(TD);
GetTypeAsString(QT, name, Context, Policy);
} else if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
// This is a namespace member.
Expand Down Expand Up @@ -1123,7 +1125,7 @@ void TClingCallFunc::exec_with_valref_return(void *address, cling::Value &ret)
R__LOCKGUARD_CLING(gInterpreterMutex);
ASTContext &Context = FD->getASTContext();
const TypeDecl *TD = dyn_cast<TypeDecl>(GetDeclContext());
QualType ClassTy(TD->getTypeForDecl(), 0);
QualType ClassTy = TD->getASTContext().getTypeDeclType(TD);
QT = Context.getLValueReferenceType(ClassTy);
ret = cling::Value(QT, *fInterp);
} else {
Expand Down
2 changes: 1 addition & 1 deletion core/metacling/src/TClingCallbacks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ bool TClingCallbacks::LookupObject(clang::TagDecl* Tag) {
const ROOT::TMetaUtils::TNormalizedCtxt* tNormCtxt = nullptr;
TCling__GetNormalizedContext(tNormCtxt);
ROOT::TMetaUtils::GetNormalizedName(Name,
C.getTypeDeclType(RD),
C.getCanonicalTagType(RD),
*m_Interpreter,
*tNormCtxt);
// Autoparse implies autoload
Expand Down
20 changes: 8 additions & 12 deletions core/metacling/src/TClingClassInfo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ TClingClassInfo::TClingClassInfo(cling::Interpreter *interp, const char *name, b
}
}
if (!decl && type) {
const TagType *tagtype =type->getAs<TagType>();
if (tagtype) {
decl = tagtype->getDecl();
if (const auto *TD = type->getAsTagDecl()) {
decl = TD;
}
}
SetDecl(decl);
Expand Down Expand Up @@ -747,9 +746,8 @@ void TClingClassInfo::Init(const char *name)
}
}
if (!GetDecl() && fType) {
const TagType *tagtype =fType->getAs<TagType>();
if (tagtype) {
SetDecl(tagtype->getDecl());
if (const auto *TD = fType->getAsTagDecl()) {
SetDecl(TD);
}
}
}
Expand Down Expand Up @@ -777,11 +775,9 @@ void TClingClassInfo::Init(const Type &tag)

R__LOCKGUARD(gInterpreterMutex);

const TagType *tagtype = fType->getAs<TagType>();
if (tagtype) {
SetDecl(tagtype->getDecl());
}
else {
if (const auto *TD = fType->getAsTagDecl()) {
SetDecl(TD);
} else {
SetDecl(nullptr);
}
if (!GetDecl()) {
Expand Down Expand Up @@ -1052,7 +1048,7 @@ int TClingClassInfo::InternalNext()
}
if (const RecordDecl *RD =
llvm::dyn_cast<RecordDecl>(GetDecl())) {
fType = RD->getASTContext().getRecordType(RD).getTypePtr();
fType = RD->getASTContext().getCanonicalTagType(RD).getTypePtr();
}
}
return 1;
Expand Down
2 changes: 1 addition & 1 deletion core/metacling/src/TClingDiagnostics.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

TClingDelegateDiagnosticPrinter::TClingDelegateDiagnosticPrinter
(clang::DiagnosticOptions *DiagOpts, clang::LangOptions &LangOpts, handler_t fn)
: TextDiagnosticPrinter(fOS, DiagOpts), fOS(fOS_out), fHandler(fn)
: TextDiagnosticPrinter(fOS, *DiagOpts), fOS(fOS_out), fHandler(fn)
{
// Required to initialize the internal `clang::TextDiagnostic` instance.
TextDiagnosticPrinter::BeginSourceFile(LangOpts, nullptr);
Expand Down
9 changes: 6 additions & 3 deletions core/metacling/src/TClingMethodInfo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,14 @@ TClingCXXRecMethIter::InstantiateTemplateWithDefaults(const clang::RedeclarableT
auto *FTD = const_cast<clang::FunctionTemplateDecl *>(llvm::dyn_cast<clang::FunctionTemplateDecl>(TD));
Sema::InstantiatingTemplate Inst(
S, Info.getLocation(), FTD,
defaultTemplateArgs, Sema::CodeSynthesisContext::DeducedTemplateArgumentSubstitution, Info);
defaultTemplateArgs, Sema::CodeSynthesisContext::DeducedTemplateArgumentSubstitution, SourceRange());

// Collect the function arguments of the templated function, substituting
// dependent types as possible.
MultiLevelTemplateArgumentList MLTAL{FTD, defaultTemplateArgs, /*Final=*/false};
// LLVM22 (CWG2369): alias templates are now eagerly expanded during substitution, which can emit hard diagnostics
// for non-SFINAE-safe alias templates. Suppress them explicitly.
Sema::SFINAETrap Trap(S, /*WithAccessChecking=*/true);
for (const clang::ParmVarDecl *param : templatedDecl->parameters()) {
QualType paramType = param->getOriginalType();

Expand Down Expand Up @@ -580,7 +583,7 @@ TClingTypeInfo *TClingMethodInfo::Type() const
if (!ctorClass) {
Error("TClingMethodInfo::Type", "Cannot find DeclContext for constructor!");
} else {
clang::QualType qt(ctorClass->getTypeForDecl(), 0);
clang::QualType qt = ctorClass->getASTContext().getTypeDeclType(ctorClass);
ti.Init(qt);
}
} else {
Expand Down Expand Up @@ -632,7 +635,7 @@ const char *TClingMethodInfo::GetPrototype()
R__LOCKGUARD(gInterpreterMutex);
if (const clang::TypeDecl *td = llvm::dyn_cast<clang::TypeDecl>(GetDecl()->getDeclContext())) {
std::string name;
clang::QualType qualType(td->getTypeForDecl(),0);
clang::QualType qualType = td->getASTContext().getTypeDeclType(td);
ROOT::TMetaUtils::GetFullyQualifiedTypeName(name,qualType,*fInterp);
buf += name;
buf += "::";
Expand Down
4 changes: 2 additions & 2 deletions core/metacling/src/TClingTypedefInfo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ const char *TClingTypedefInfo::TrueName(const ROOT::TMetaUtils::TNormalizedCtxt
return "bool";
}
const clang::ASTContext &ctxt = fInterp->getCI()->getASTContext();
ROOT::TMetaUtils::GetNormalizedName(truename, ctxt.getTypedefType(td), *fInterp, normCtxt);
ROOT::TMetaUtils::GetNormalizedName(truename, ctxt.getTypedefType(ElaboratedTypeKeyword::None, /*Qualifier=*/std::nullopt, td), *fInterp, normCtxt);

return truename.c_str(); // NOLINT
}
Expand All @@ -262,7 +262,7 @@ const char *TClingTypedefInfo::Name() const

const clang::TypedefNameDecl *td = llvm::cast<clang::TypedefNameDecl>(fDecl);
const clang::ASTContext &ctxt = td->getASTContext();
ROOT::TMetaUtils::GetFullyQualifiedTypeName(fNameCache, ctxt.getTypedefType(td), *fInterp);
ROOT::TMetaUtils::GetFullyQualifiedTypeName(fNameCache, ctxt.getTypedefType(ElaboratedTypeKeyword::None, /*Qualifier=*/std::nullopt, td), *fInterp);
return fNameCache.c_str();
}

Expand Down
2 changes: 1 addition & 1 deletion interpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ if (builtin_clang)
${CMAKE_CURRENT_SOURCE_DIR}/llvm-project/clang/include
${CLANG_BINARY_DIR}/include
CACHE STRING "Clang include directories.")
set(CLANG_CMAKE_DIR "${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/")
set(CLANG_CMAKE_DIR "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/")
else()
find_package(Clang REQUIRED CONFIG)
message(STATUS "Found Clang ${CLANG_PACKAGE_VERSION} in ${CLANG_CMAKE_DIR}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ namespace cling {
/// paths.
void addHeaderSearchPathFlags(
std::vector<std::string>& argv,
const std::shared_ptr<clang::HeaderSearchOptions> &headerSearchOptions);
const clang::HeaderSearchOptions& headerSearchOptions);

///\brief Compiles a PTX file from the current input. The PTX code is
/// written to cling.ptx.
Expand Down
Loading
Loading