Skip to content

LLVM Changelog

Breaking changes encountered during each LLVM upgrade, with upstream commit references.

LLVM 21 → 22

Type System

ChangeCommitPRImpact on clice
NestedNameSpecifier redesigned as a value type; ElaboratedType removed — tag/typedef/using/template-specialization types now carry the elaborated keyword and qualifier themselves. NNS kinds reduced to Null/Global/Type/Namespace/MicrosoftSuper; the old Identifier kind is now a DependentNameType component of kind Type.91cdd35008e9#147835Rewrote NNS handling in the template resolver, semantic visitor, unifier, display and USR generation. rewrite_specifier collapsed to a single type-component rewrite; NNS occurrence handling dropped the Identifier/NamespaceAlias cases (dependent chains are now visited as DependentNameTypeLocs).
DependentTemplateSpecializationType removed; a dependent specialization is a TemplateSpecializationType whose TemplateName is a DependentTemplateName. ASTContext::getDependentTemplateSpecializationType gone; getTemplateSpecializationType takes an ElaboratedTypeKeyword first parameter.ba9d1c41c41d#158109Resolver's DTST lookup/rewrite/pseudo-SFINAE paths merged into the TST paths, keyed on getAsDependentTemplateName().
InjectedClassNameType is now a TagType subclass and no longer stores the injected specialization; use CXXRecordDecl::getCanonicalTemplateSpecializationType(Ctx). TagDecl::getTypeForDecl deleted; use ASTContext::getCanonicalTagType.91cdd35008e9#147835Resolver, unifier, USR generation and hover layout info migrated to the canonical accessors.
NamespaceBaseDecl introduced; a Namespace NNS component stores it (covers both namespaces and namespace aliases).4a9eaad9e128#149123Namespace lookup goes through getAsNamespaceAndPrefix().Namespace->getNamespace(); alias occurrences reference the base decl directly.
UsingType::getFoundDecl/getUnderlyingType renamed to getDecl/desugar; TypedefTypeLoc::getTypedefNameDecl is getDecl.91cdd35008e9#147835Mechanical renames in unifier, resolver and semantic visitor.
Implicit variable template specializations no longer store written template arguments.1cb47c19f8ec#156329display::template_args falls back to the converted argument list, so hover titles print baz<ns::X<int>> (converted, qualified) instead of the as-written form.
RecursiveASTVisitor type traversals take a TraverseQualifier flag; DynTypedNode::getSourceRange takes IncludeQualifier (default excludes the qualifier of qualified type locs).91cdd35008e9#147835Semantic visitor overrides updated; selection-tree node ranges now exclude qualifiers (matching clangd), so a cursor on a dependent name selects its DependentNameTypeLoc name token.

Driver / Frontend

ChangeCommitPRImpact on clice
Option handling split out of clangDriver into a clangOptions library: clang/Driver/Options.incclang/Options/Options.inc, GetResourcesPathclang/Options/OptionUtils.h (namespace clang).f63d33da0a51#167374Include-path and call-site updates in the argument parser.
OptTable gained subcommand support: the OPTION record has a trailing SUBCOMMANDIDS_OFFSET column.fdbd17d1fb0d#155026The OPTION macros expanding Options.inc take the extra parameter.
clang::createInvocation moved to clang/Driver/CreateInvocationFromArgs.h.d090311aa7df#169599Include updates in compilation and scan.
CompilerInstance owns its VFS explicitly: seed it with setVirtualFileSystem/createVirtualFileSystem (the latter subsumes createVFSFromCompilerInvocation), then createDiagnostics(Client, ShouldOwnClient) and createFileManager() take no VFS.30633f308941#158381Compilation and scan set the VFS on the instance before creating diagnostics and the file manager.

Other

ChangeCommitPRImpact on clice
llvm::sys::fs::make_absolute(current_directory, path) moved to llvm::sys::path::make_absolute.f122484b998d#161459Call-site update in header search config.
size_t and friends are named sugar types (__size_t), so e.g. operator new's parameter prints as __size_t with an aka unsigned long.7c402b8b81d2#149613Hover snapshots updated.
Anonymous tag types print as (unnamed enum)/(unnamed struct) uniformly.4ef641916408#169445Hover snapshots updated.
PrintingPolicy::SuppressScope now also drops written qualifiers of template names, and canonical tag types print fully qualified.91cdd35008e9#147835Inlay type hints lose nested-class scopes (Nested<int> instead of S2::Nested<int>, matching clangd); hover of this prints the namespace-qualified class type.