[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CodeGenCXX / copy-elision.cpp
blob9250f50e16079303833af2fa6b2ee3388a13cc90
1 // RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown-gnu -emit-llvm -O1 -fexperimental-new-pass-manager -o - %s | FileCheck %s
3 template <class T> T test() {
4 return T();
7 struct A {
8 A();
9 A(A &);
10 A(int);
11 operator int();
14 // FIXME: There should be copy elision here.
15 // CHECK-LABEL: define{{.*}} void @_Z4testI1AET_v
16 // CHECK: call void @_ZN1AC1Ev
17 // CHECK-NEXT: call noundef i32 @_ZN1AcviEv
18 // CHECK-NEXT: call void @_ZN1AC1Ei
19 // CHECK-NEXT: call void @llvm.lifetime.end
20 template A test<A>();
22 struct BSub {};
23 struct B : BSub {
24 B();
25 B(B &);
26 B(const BSub &);
29 // FIXME: There should be copy elision here.
30 // CHECK-LABEL: define{{.*}} void @_Z4testI1BET_v
31 // CHECK: call void @_ZN1BC1Ev
32 // CHECK: call void @_ZN1BC1ERK4BSub
33 // CHECK-NEXT: call void @llvm.lifetime.end
34 template B test<B>();