diff options
Diffstat (limited to 'clang/test/CodeGenCXX/new.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/new.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/new.cpp b/clang/test/CodeGenCXX/new.cpp index d8aa258cbbf..862161b1938 100644 --- a/clang/test/CodeGenCXX/new.cpp +++ b/clang/test/CodeGenCXX/new.cpp @@ -2,6 +2,9 @@ typedef __typeof__(sizeof(0)) size_t; +// Declare an 'operator new' template to tickle a bug in __builtin_operator_new. +template<typename T> void *operator new(size_t, int (*)(T)); + // Ensure that this declaration doesn't cause operator new to lose its // 'noalias' attribute. void *operator new[](size_t); @@ -33,7 +36,6 @@ void *operator new[](size_t, const std::nothrow_t &) throw(); void operator delete(void *, const std::nothrow_t &) throw(); void operator delete[](void *, const std::nothrow_t &) throw(); - void t2(int* a) { int* b = new (a) int; } |

