[PATCH] D83647: Don't allow mangling substitutions to refer to unrelated entities from different <encoding>s.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 12 14:11:13 PDT 2020


rsmith created this revision.
rsmith added a reviewer: rjmccall.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Per the ABI rules, substitutable components are symbolic constructs, not
the associated mangling character strings, so references to function
parameters or template parameters of distinct <encoding>s should not be
considered substitutable even if they're at the same depth / index.

See https://github.com/itanium-cxx-abi/cxx-abi/issues/106.

This change can be turned off by setting -fclang-abi-compat to 10 or
earlier.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83647

Files:
  clang/include/clang/Basic/LangOptions.h
  clang/lib/AST/ItaniumMangle.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/test/CodeGenCXX/mangle-abi-tag.cpp
  clang/test/CodeGenCXX/mangle-local-substitutions.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83647.277303.patch
Type: text/x-patch
Size: 17864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200712/2c9ad875/attachment-0001.bin>


More information about the cfe-commits mailing list