YouCompleteMe/cpp/llvm/tools/clang/test/SemaCXX/new-delete-predefined-decl.cpp
Strahinja Val Markovic 1f51a89d39 Adding more llvm/clang files
These were ignored by git accidentally. We want ALL OF THEM since they all came
in the llvm/clang source distribution.
2012-07-05 17:55:45 -07:00

20 lines
494 B
C++

// RUN: %clang_cc1 -DTEMPLATE_OVERLOAD -fsyntax-only -verify %s
// RUN: %clang_cc1 -fsyntax-only -verify %s
#include <stddef.h>
// 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<typename T> void* operator new(size_t, T);
void test_template_overload() {
(void)new(0) double;
}
#endif
void test_predefined() {
(void)new double;
}