diff options
Diffstat (limited to 'test/CodeGenCXX/unaligned-duplicated-mangle-name.cpp')
-rw-r--r-- | test/CodeGenCXX/unaligned-duplicated-mangle-name.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGenCXX/unaligned-duplicated-mangle-name.cpp b/test/CodeGenCXX/unaligned-duplicated-mangle-name.cpp new file mode 100644 index 000000000000..a23e6a47ab05 --- /dev/null +++ b/test/CodeGenCXX/unaligned-duplicated-mangle-name.cpp @@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -fms-extensions -emit-llvm-only %s -verify + +struct A +{ + int x; + void foo() __unaligned; + void foo(); +}; + +void A::foo() __unaligned +{ + this->x++; +} + +void A::foo() // expected-error {{definition with same mangled name as another definition}} + // expected-note@-6 {{previous definition is here}} +{ + this->x++; +} + |