brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 07a64ea Raw
33 lines · cpp
1// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK2// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK3// RUN: %clang_cc1 -std=c++14 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK4// RUN: %clang_cc1 -std=c++17 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK5// RUN: %clang_cc1 -std=c++20 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK6// RUN: %clang_cc1 -std=c++23 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK7// RUN: %clang_cc1 -std=c++2c %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK8 9#if __cplusplus == 199711L10#define NOTHROW throw()11#else12#define NOTHROW noexcept(true)13#endif14 15namespace cwg672 { // cwg672: 2.716 17struct A {18  A() NOTHROW;19};20 21void f() {22  A *a = new A;23}24 25} // namespace cwg67226 27// CHECK-LABEL: define {{.*}} void @cwg672::f()()28// CHECK:         [[A:%.+]] = alloca ptr29// CHECK:         [[CALL:%.+]] = call {{.*}} ptr @operator new(unsigned long)30// CHECK:         call void @cwg672::A::A()31// CHECK:         store ptr [[CALL]], ptr [[A]]32// CHECK-LABEL: }33