[all-commits] [llvm/llvm-project] e42b79: [clang] NFCI: use TemplateArgumentLoc for type-par...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Tue May 21 16:28:12 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e42b799bb28815431f2c5a95f7e13fde3f1b36a1
      https://github.com/llvm/llvm-project/commit/e42b799bb28815431f2c5a95f7e13fde3f1b36a1
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2024-05-21 (Tue, 21 May 2024)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp
    M clang-tools-extra/clang-tidy/bugprone/IncorrectEnableIfCheck.cpp
    M clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp
    M clang-tools-extra/clangd/Hover.cpp
    M clang/include/clang/AST/ASTNodeTraverser.h
    M clang/include/clang/AST/DeclTemplate.h
    M clang/include/clang/AST/RecursiveASTVisitor.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/AST/DeclPrinter.cpp
    M clang/lib/AST/DeclTemplate.cpp
    M clang/lib/AST/JSONNodeDumper.cpp
    M clang/lib/AST/ODRDiagsEmitter.cpp
    M clang/lib/AST/ODRHash.cpp
    M clang/lib/AST/TypePrinter.cpp
    M clang/lib/ExtractAPI/DeclarationFragments.cpp
    M clang/lib/Index/IndexDecl.cpp
    M clang/lib/Sema/HLSLExternalSemaSource.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    M clang/lib/Serialization/ASTReaderDecl.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    M clang/tools/libclang/CIndex.cpp
    M clang/unittests/AST/ASTImporterTest.cpp

  Log Message:
  -----------
  [clang] NFCI: use TemplateArgumentLoc for type-param DefaultArgument (#92854)

This is an enabler for a future patch.

This allows an type-parameter default argument to be set as an arbitrary
TemplateArgument, not just a type.
This allows template parameter packs to have default arguments in the
AST, even though the language proper doesn't support the syntax for it.

This will be used in a later patch which synthesizes template parameter
lists with arbitrary default arguments taken from template
specializations.

There are a few places we used SubsType, because we only had a type, now
we use SubstTemplateArgument.
SubstTemplateArgument was missing arguments for setting Instantiation
location and entity names.
Adding those is needed so we don't regress in diagnostics.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list