[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / new-delete-predefined-decl.cpp
blobae100653611281ae744615fe91f6220748747bb2
1 // RUN: %clang_cc1 -DTEMPLATE_OVERLOAD -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // expected-no-diagnostics
5 #include <stddef.h>
7 // Note that each test must be run separately so it can be the first operator
8 // new declaration in the file.
10 #if defined(TEMPLATE_OVERLOAD)
11 // Don't crash on global template operator new overloads.
12 template<typename T> void* operator new(size_t, T);
13 void test_template_overload() {
14 (void)new(0) double;
16 #endif
18 void test_predefined() {
19 (void)new double;