1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only %s -verify -DTEST1
2 // RUN: %clang_cc1 -triple %itanium_abi_triple-only %s -verify -DTEST2 -emit-llvm -o - | FileCheck %s
3 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only %s -verify -DTEST3
4 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only %s -verify -DTEST4
11 void MyClass::meth() { } // expected-note {{previous}}
13 void _ZN7MyClass4methEv() { } // expected-error {{definition with same mangled name '_ZN7MyClass4methEv' as another definition}}
18 // expected-no-diagnostics
20 // We expect no warnings here, as there is only declaration of _ZN1TD1Ev
21 // function, no definitions.
22 extern "C" void _ZN1TD1Ev();
27 // We expect no warnings here, as there is only declaration of _ZN2nm3abcE
28 // global, no definitions.
36 // CHECK: @_ZN2nm3abcE = {{(dso_local )?}}global float
40 // CHECK: call void @_ZN1TD1Ev()
42 // CHECK: call {{.*}} @_ZN1TD1Ev(ptr {{[^,]*}} %t)
43 return _ZN2nm3abcE
+ nm::abc
;
48 extern "C" void _ZN2T2D2Ev() {}; // expected-note {{previous definition is here}}
51 ~T2() {} // expected-error {{definition with same mangled name '_ZN2T2D2Ev' as another definition}}
62 int _ZN2nm3abcE
= 1; // expected-note {{previous definition is here}}
66 float abc
= 2; // expected-error {{definition with same mangled name '_ZN2nm3abcE' as another definition}}
70 return _ZN2nm3abcE
+ nm::abc
;