aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/new-infallible.cpp
blob: 226cb20c9c556de3cb2f56b33289b58b7845c052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu -fnew-infallible -o - %s | FileCheck %s
// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu -fno-new-infallible -fnew-infallible -o - %s | FileCheck %s
// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu -fno-new-infallible -o - %s | FileCheck %s --check-prefix=NO-NEW-INFALLIBLE
// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu -fnew-infallible -fno-new-infallible -o - %s | FileCheck %s --check-prefix=NO-NEW-INFALLIBLE

// CHECK: call noalias noundef nonnull ptr @_Znwm(i64 noundef 4)

// CHECK: ; Function Attrs: nobuiltin nounwind allocsize(0)
// CHECK-NEXT: declare noundef nonnull ptr @_Znwm(i64 noundef)

// NO-NEW-INFALLIBLE: call noalias noundef nonnull ptr @_Znwm(i64 noundef 4)

// NO-NEW-INFALLIBLE: ; Function Attrs: nobuiltin allocsize(0)
// NO-NEW-INFALLIBLE-NEXT: declare noundef nonnull ptr @_Znwm(i64 noundef)

int *new_infallible = new int;