]> granicus.if.org Git - clang/commit
[-cxx-abi microsoft] Mangle local TagDecls appropriately
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 17 Sep 2013 22:21:27 +0000 (22:21 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 17 Sep 2013 22:21:27 +0000 (22:21 +0000)
commit075404782734005e4742621ba4fa29e334cd4987
tree155876dd4911c24d7bc0c38e7faf8d07e4a55173
parent641645f00c22e1f55794537a43646214402e99a1
[-cxx-abi microsoft] Mangle local TagDecls appropriately

Summary:
When selecting a mangling for an anonymous tag type:
- We should first try it's typedef'd name.
- If that doesn't work, we should mangle in the name of the declarator
  that specified it as a declaration specifier.
- If that doesn't work, fall back to a static mangling of
  <unnamed-type>.

This should make our anonymous type mangling compatible.

This partially fixes PR16994; we would need to have an implementation of
scope numbering to get it right (a separate issue).

Reviewers: rnk, rsmith, rjmccall, cdavis5x

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1540

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190892 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Decl.h
lib/AST/Decl.cpp
lib/AST/MicrosoftMangle.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp
test/CodeGenCXX/mangle-ms.cpp