2013-05-30 09:55:39 +08:00
|
|
|
// RUN: %clang_cc1 -fms-compatibility -fsyntax-only -verify %s
|
|
|
|
// expected-no-diagnostics
|
|
|
|
|
2013-05-30 10:17:14 +08:00
|
|
|
#include <stddef.h>
|
|
|
|
|
2013-05-30 09:55:39 +08:00
|
|
|
struct arbitrary_t {} arbitrary;
|
2013-05-30 10:17:14 +08:00
|
|
|
void *operator new(size_t size, arbitrary_t);
|
2013-05-30 09:55:39 +08:00
|
|
|
|
|
|
|
void f() {
|
|
|
|
// Expect no error in MSVC compatibility mode
|
|
|
|
int *p = new(arbitrary) int[4];
|
|
|
|
}
|