Avoid assert when a non-static member function is qualified with __unaligned
authorRoger Ferrer Ibanez <roger.ferreribanez@arm.com>
Wed, 19 Apr 2017 12:23:28 +0000 (12:23 +0000)
committerRoger Ferrer Ibanez <roger.ferreribanez@arm.com>
Wed, 19 Apr 2017 12:23:28 +0000 (12:23 +0000)
commitcb89513bc74257178e8adb09029b64ab8b52bed5
tree8946175d1e13fb74b73d37ad8979e1cd25d490d2
parentf3f923c9d22268f6ea468ebd3703b052b6dac16d
Avoid assert when a non-static member function is qualified with __unaligned

Under -fms-extensions __unaligned is a type-qualifier that can be applied to a
non-static member function declaration.

This causes an assertion when mangling the name under Itanium, where that
qualifier is not mangled.

This patch justs makes the minimal change to avoid the crash and avoid mangling
__unaligned, as it currently happens with non-member functions.

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

llvm-svn: 300686
clang/lib/AST/ItaniumMangle.cpp
clang/test/CodeGenCXX/unaligned-duplicated-mangle-name.cpp [new file with mode: 0644]