Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/test/CodeGenCXX/cxx1y-sized-deallocation.cpp
// Check that delete exprs call the sized deallocation function if | // Check that delete exprs call the sized deallocation function if | ||||
// -fsized-deallocation is passed in both C++11 and C++14. | // -fsized-deallocation is passed in both C++11 and C++14. | ||||
// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fsized-deallocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s | // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fsized-deallocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s | ||||
// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 -fsized-deallocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s | // RUN: %clang_cc1 -no-opaque-pointers -std=c++14 -fsized-deallocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s | ||||
// Check that we don't used sized deallocation without -fsized-deallocation and | // Check that we don't used sized deallocation with -fno-sized-deallocation or without C++14. | ||||
// C++14. | // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 %s -emit-llvm -triple x86_64-linux-gnu -o - \ | ||||
// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefix=CHECK-UNSIZED | // RUN: | FileCheck %s --check-prefix=CHECK-UNSIZED | ||||
// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefix=CHECK-UNSIZED | // RUN: %clang_cc1 -no-opaque-pointers -std=c++14 %s -emit-llvm -triple x86_64-linux-gnu -fno-sized-deallocation -o - \ | ||||
// RUN: | FileCheck %s --check-prefix=CHECK-UNSIZED | |||||
// CHECK-UNSIZED-NOT: _ZdlPvm | // CHECK-UNSIZED-NOT: _ZdlPvm | ||||
// CHECK-UNSIZED-NOT: _ZdaPvm | // CHECK-UNSIZED-NOT: _ZdaPvm | ||||
typedef decltype(sizeof(0)) size_t; | typedef decltype(sizeof(0)) size_t; | ||||
typedef int A; | typedef int A; | ||||
struct B { int n; }; | struct B { int n; }; | ||||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |