Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
73b5714
Import ROOT-llvm22
devajithvs Feb 27, 2026
734d2e5
[cling][LLVM20] Misc adaptations for updated APIs
devajithvs Feb 27, 2026
7ed5a3d
[cling] Unload: TopLevelStmtDecl special casing
devajithvs Mar 11, 2026
38c1042
[core][LLVM22] Adapt to LLVM 22 API changes
devajithvs Mar 5, 2026
d128ca9
[cling][AST] Add utility function `QualifyTypeUnderPrefix`
devajithvs Jun 11, 2026
53e7069
[cling][AST] Copy `QualTypeName.cpp` functions into `AST.cpp`
devajithvs Mar 5, 2026
67bded1
[cling][LLVM22] All the NestedNameSpecifier changes
devajithvs Mar 3, 2026
373e1bc
[core][LLVM22] All NestedNameSpecifier changes
devajithvs Mar 12, 2026
5b694a2
[cling][AST] Add `getFullyQualifiedType` changes needed for cling
devajithvs Jun 12, 2026
04eec2a
[cling][AST][Desugar] Strip AutoType early before the type-specific h…
devajithvs May 13, 2026
bfb8f59
[cling][AST] PartialDesugaring: Fix loss of namespace prefix for TST
devajithvs Jun 15, 2026
bd140f9
[cling][AST] Strip unnecessary global '::' qualifier for TemplateNames
devajithvs Apr 17, 2026
fe073cd
[cling][AST] Restore partial desugaring of global RecordType prefixes…
devajithvs Apr 10, 2026
a16b317
[TClassEdit][REVISIT] Map `__size_t` and `__ptrdiff_t` aliases back t…
devajithvs Mar 24, 2026
7e28943
[TCling] Strip tag keywords to handle LLVM22 elaborated type removal
devajithvs Apr 1, 2026
3f3959a
[TCling][NestedNameSpecifier] ReSubstTemplateArg: Early return only f…
devajithvs Apr 24, 2026
11e075a
[cling][test] Update output print types
devajithvs Mar 11, 2026
e344e48
[cling][test] Fix Transform test: populate m_toReplace for std::string
devajithvs Jun 15, 2026
c70cc5d
[roottest] Update reference files after LLVM22
devajithvs Mar 20, 2026
dc73001
[roottest][meta] Update test-case to reflect what was written
devajithvs Apr 15, 2026
5003509
[roottest] Adapt ResolveTypedef test for LLVM22 UsingType desugaring
devajithvs Apr 22, 2026
8e44cee
[cppyy] Unmark xfail, this test now passes with LLVM22
devajithvs Apr 20, 2026
eda8a21
[cling] Enable SuppressTagKeywordInAnonNames by default
devajithvs Apr 10, 2026
7c87d5b
[cling][macos] Allow framework includes in System group in CopyInclud…
devajithvs May 13, 2026
2636c90
[cling] Clear `UnsubstitutedConstraintSatisfactionCache` on unload
devajithvs May 19, 2026
49bf9c3
[cling] Suppress SFINAE diagnostics in InstantiateTemplateWithDefaults
devajithvs Jun 3, 2026
d02172d
[TEMPORARY] Turn off AdaptiveCpp and CLAD temporarily
devajithvs Mar 23, 2026
e6bdd3a
[cling][AST] Remove dead ElaboratedType code paths
devajithvs Jun 16, 2026
4691a03
[TCling][REVISIT] Strip tag keywords to handle LLVM22 elaborated type…
devajithvs Apr 1, 2026
723d4ab
Revert "[TCling] Strip tag keywords to handle LLVM22 elaborated type …
devajithvs Jun 22, 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.
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
2 changes: 1 addition & 1 deletion .github/workflows/root-ci-config/buildconfig/global.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ builtin_zstd=OFF
ccache=ON
cefweb=OFF
check_connection=OFF
clad=ON
clad=OFF
clingtest=OFF
cocoa=OFF
coverage=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
2 changes: 1 addition & 1 deletion cmake/modules/RootBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ ROOT_BUILD_OPTION(builtin_zstd OFF "Build included libzstd, or use system libzst
ROOT_BUILD_OPTION(ccache OFF "Enable ccache usage for speeding up builds")
ROOT_BUILD_OPTION(cefweb OFF "Enable support for CEF (Chromium Embedded Framework) web-based display")
ROOT_BUILD_OPTION(check_connection ON "Fail the configuration step if there is no internet connection, but it's required for the build")
ROOT_BUILD_OPTION(clad ON "Build clad, the cling automatic differentiation plugin (requires network, or existing source directory indicated with -DCLAD_SOURCE_DIR=<clad_src_path>)")
ROOT_BUILD_OPTION(clad OFF "Build clad, the cling automatic differentiation plugin (requires network, or existing source directory indicated with -DCLAD_SOURCE_DIR=<clad_src_path>)")
ROOT_BUILD_OPTION(cocoa OFF "Use native Cocoa/Quartz graphics backend (MacOS X only)")
ROOT_BUILD_OPTION(coverage OFF "Enable compile flags for coverage testing")
ROOT_BUILD_OPTION(cuda OFF "Enable support for CUDA (requires CUDA toolkit >= 7.5)")
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
194 changes: 94 additions & 100 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 @@ -5184,11 +5184,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 @@ -6844,7 +6844,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 @@ -8888,7 +8888,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
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