[all-commits] [llvm/llvm-project] 6c365c: Consider reference, pointer, and pointer-to-member...

Richard Smith via All-commits all-commits at lists.llvm.org
Tue Dec 15 12:01:22 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c365cd31e323d2d075573edd927e4f7fb5ec01c
      https://github.com/llvm/llvm-project/commit/6c365cd31e323d2d075573edd927e4f7fb5ec01c
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-12-15 (Tue, 15 Dec 2020)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.h
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/AST/StmtProfile.cpp
    M clang/lib/AST/TemplateBase.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/test/CodeGenCXX/clang-abi-compat.cpp
    M clang/test/CodeGenCXX/mangle-class-nttp.cpp
    M clang/test/CodeGenCXX/mangle-template.cpp
    M clang/test/SemaTemplate/temp_arg_nontype.cpp
    M clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp

  Log Message:
  -----------
  Consider reference, pointer, and pointer-to-member TemplateArguments to be different if they have different types.

For the Itanium ABI, this implements the mangling rule suggested in
https://github.com/itanium-cxx-abi/cxx-abi/issues/47, namely mangling
such template arguments as being cast to the parameter type in the case
where the template name is overloadable. This can cause a mangling
change for rare cases, where

 * the template argument declaration is converted from its declared type
   to the type of the template parameter, and
 * the template parameter either has a deduced type or is a parameter of
   a function template.

However, such changes are necessary to avoid mangling collisions. The
ABI changes can be reversed with -fclang-abi-compat=11 or earlier.

Re-commit with a fix for a couple of regressions.

Differential Revision: https://reviews.llvm.org/D91488


  Commit: 76edf98b27c45f1aa26c1972927ce1638cda50fd
      https://github.com/llvm/llvm-project/commit/76edf98b27c45f1aa26c1972927ce1638cda50fd
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-12-15 (Tue, 15 Dec 2020)

  Changed paths:
    M clang/lib/Serialization/ASTReaderStmt.cpp

  Log Message:
  -----------
  Set decl on DeclRefExpr directly during deserialization rather than
relying on a setter that might have additional side-effects. NFC.


Compare: https://github.com/llvm/llvm-project/compare/ef40d5233b8b...76edf98b27c4


More information about the All-commits mailing list