From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/SemaCXX/new-delete-predefined-decl.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 clang/test/SemaCXX/new-delete-predefined-decl.cpp (limited to 'clang/test/SemaCXX/new-delete-predefined-decl.cpp') diff --git a/clang/test/SemaCXX/new-delete-predefined-decl.cpp b/clang/test/SemaCXX/new-delete-predefined-decl.cpp new file mode 100644 index 0000000..20b15b7 --- /dev/null +++ b/clang/test/SemaCXX/new-delete-predefined-decl.cpp @@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -DTEMPLATE_OVERLOAD -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s + +#include + +// Note that each test must be run separately so it can be the first operator +// new declaration in the file. + +#if defined(TEMPLATE_OVERLOAD) +// Don't crash on global template operator new overloads. +template void* operator new(size_t, T); +void test_template_overload() { + (void)new(0) double; +} +#endif + +void test_predefined() { + (void)new double; +} -- cgit v1.2.3