diff --git a/clang/test/AST/Interp/c.c b/clang/test/AST/Interp/c.c index 0b673253c6c70..65d83eab2ea19 100644 --- a/clang/test/AST/Interp/c.c +++ b/clang/test/AST/Interp/c.c @@ -113,20 +113,17 @@ int somefunc(int i) { /// FIXME: The following test is incorrect in the new interpreter. /// The null pointer returns 16 from its getIntegerRepresentation(). +#pragma clang diagnostic ignored "-Wpointer-to-int-cast" struct ArrayStruct { char n[1]; }; struct AA { - char name2[(int)&((struct ArrayStruct*)0)->n - 1]; // expected-warning {{cast to smaller integer type}} \ - // expected-warning {{folded to constant array}} \ - // pedantic-expected-warning {{cast to smaller integer type}} \ + char name2[(int)&((struct ArrayStruct*)0)->n - 1]; // expected-warning {{folded to constant array}} \ // pedantic-expected-warning {{folded to constant array}} \ // ref-error {{array size is negative}} \ - // ref-warning {{cast to smaller integer type}} \ - // pedantic-ref-error {{array size is negative}} \ - // pedantic-ref-warning {{cast to smaller integer type}} + // pedantic-ref-error {{array size is negative}} }; _Static_assert(sizeof(struct AA) == 15, ""); // ref-error {{failed}} \ - // ref-note {{1 == 15}} \ + // ref-note {{ == 15}} \ // pedantic-ref-error {{failed}} \ - // pedantic-ref-note {{1 == 15}} + // pedantic-ref-note {{ == 15}}