Richard Smith 9ca5c42582 Update all tests other than Driver/std.cpp to use -std=c++11 rather than
-std=c++0x. Patch by Ahmed Charles!

llvm-svn: 141900
2011-10-13 22:29:44 +00:00

14 lines
467 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -fexceptions %s
typedef __SIZE_TYPE__ size_t;
struct S {
// Placement allocation function:
static void* operator new(size_t, size_t);
// Usual (non-placement) deallocation function:
static void operator delete(void*, size_t); // expected-note{{declared here}}
};
void testS() {
S* p = new (0) S; // expected-error{{'new' expression with placement arguments refers to non-placement 'operator delete'}}
}