[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CodeGenCXX / visibility-hidden-extern-templates.cpp
blobc84c7fbc97b266b7d4befdc0e02c3a74ce768965
1 // RUN: %clang_cc1 -O1 -fno-experimental-new-pass-manager -triple %itanium_abi_triple -emit-llvm -o - -fvisibility hidden %s | FileCheck %s
3 template<typename T>
4 struct X {
5 void f();
6 void g() { }
7 };
9 template<typename T> void X<T>::f() { }
11 extern template struct X<int>;
12 template struct X<int>;
13 extern template struct X<char>;
15 // <rdar://problem/8109763>
16 void test_X(X<int> xi, X<char> xc) {
17 // CHECK-LABEL: define weak_odr hidden {{.*}}void @_ZN1XIiE1fEv
18 xi.f();
19 // CHECK-LABEL: define weak_odr hidden {{.*}}void @_ZN1XIiE1gEv
20 xi.g();
21 // CHECK: declare {{.*}}void @_ZN1XIcE1fEv
22 xc.f();
23 // CHECK-LABEL: define available_externally {{.*}}void @_ZN1XIcE1gEv
24 xc.g();