blob: 6234b740a4797878bd563ab4bb9d7b3a47f63939 [file] [log] [blame]
Chandler Carruth4a73ea92010-02-03 11:02:14 +00001// RUN: %clang_cc1 -DTEMPLATE_OVERLOAD -fsyntax-only -verify %s
2
3#include <stddef.h>
4
5// Note that each test must be run separately so it can be the first operator
6// new declaration in the file.
7
8#if defined(TEMPLATE_OVERLOAD)
9// Don't crash on global template operator new overloads.
10template<typename T> void* operator new(size_t, T);
11void test_template_overload() {
12 (void)new(0) double;
13}
14#endif
15
16void test_predefined() {
17 (void)new double;
18}