mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 12:56:08 +00:00

This patch is breaking `dr` to `cwg` equivalence in our terminology, making room for tests for LWG issues that concern compiler intrinsics.
33 lines
1.7 KiB
C++
33 lines
1.7 KiB
C++
// 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 CHECK
|
|
// 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 CHECK
|
|
// 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 CHECK
|
|
// 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 CHECK
|
|
// 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 CHECK
|
|
// 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 CHECK
|
|
// 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 CHECK
|
|
|
|
#if __cplusplus == 199711L
|
|
#define NOTHROW throw()
|
|
#else
|
|
#define NOTHROW noexcept(true)
|
|
#endif
|
|
|
|
namespace cwg672 { // cwg672: 2.7
|
|
|
|
struct A {
|
|
A() NOTHROW;
|
|
};
|
|
|
|
void f() {
|
|
A *a = new A;
|
|
}
|
|
|
|
} // namespace cwg672
|
|
|
|
// CHECK-LABEL: define {{.*}} void @cwg672::f()()
|
|
// CHECK: [[A:%.+]] = alloca ptr
|
|
// CHECK: [[CALL:%.+]] = call {{.*}} ptr @operator new(unsigned long)
|
|
// CHECK: call void @cwg672::A::A()
|
|
// CHECK: store ptr [[CALL]], ptr [[A]]
|
|
// CHECK-LABEL: }
|