1 // RUN: %clang_cc1 -std=c++98 -triple i386-unknown-unknown -fno-elide-constructors -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CXX98
2 // RUN: %clang_cc1 -std=c++11 -triple i386-unknown-unknown -fno-elide-constructors -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CXX11
3 // RUN: %clang_cc1 -std=c++98 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CXX98-ELIDE
4 // RUN: %clang_cc1 -std=c++11 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CXX11-ELIDE
6 // Reduced from PR12208
11 #if __cplusplus >= 201103L
17 // CHECK-LABEL: define{{.*}} void @_Z4Testv(
22 // Check that the copy constructor for X is called with result variable as
24 // CHECK-CXX98: call void @_ZN1XC1ERKS_(
25 // CHECK-CXX11: call void @_ZN1XC1EOS_(
26 // CHECK-CXX98-ELIDE-NOT: call void @_ZN1XC1ERKS_(
27 // CHECK-CXX11-ELIDE-NOT: call void @_ZN1XC1EOS_(
29 // Make sure that the destructor for X is called.
30 // FIXME: This call is present even in the -ELIDE runs, but is guarded by a
31 // branch that is never taken in those cases. We could generate better IR
33 // CHECK: call void @_ZN1XD1Ev(