[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / PCH / cxx-mangling.cpp
blob280268750ae5cc8a2a84d5b01f4e137d40c38793
1 // Test without PCH.
2 // RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include %s %s -emit-llvm -o - | FileCheck %s
3 //
4 // Test with PCH.
5 // RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -x c++-header %s -emit-pch -o %t
6 // RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t %s -emit-llvm -o - | FileCheck %s
8 #ifndef HEADER
9 #define HEADER
11 struct A {
12 struct { int a; } a;
13 struct { int b; } b;
16 #else
18 template<typename T> void f(T) {}
20 // CHECK-LABEL: define {{.*}}void @_Z1g1A(
21 void g(A a) {
22 // CHECK: call {{.*}}void @_Z1fIN1AUt0_EEvT_(
23 f(a.b);
24 // CHECK: call {{.*}}void @_Z1fIN1AUt_EEvT_(
25 f(a.a);
28 #endif