Skip to content

Commit 73e5466

Browse files
committed
[clang][Interp] Fix up broken test case
This was not working right on armv8: https://lab.llvm.org/buildbot/#/builders/245/builds/20020
1 parent b840d29 commit 73e5466

File tree

1 file changed

+5
-8
lines changed
  • clang/test/AST/Interp

1 file changed

+5
-8
lines changed

clang/test/AST/Interp/c.c

+5-8
Original file line numberDiff line numberDiff line change
@@ -113,20 +113,17 @@ int somefunc(int i) {
113113

114114
/// FIXME: The following test is incorrect in the new interpreter.
115115
/// The null pointer returns 16 from its getIntegerRepresentation().
116+
#pragma clang diagnostic ignored "-Wpointer-to-int-cast"
116117
struct ArrayStruct {
117118
char n[1];
118119
};
119120
struct AA {
120-
char name2[(int)&((struct ArrayStruct*)0)->n - 1]; // expected-warning {{cast to smaller integer type}} \
121-
// expected-warning {{folded to constant array}} \
122-
// pedantic-expected-warning {{cast to smaller integer type}} \
121+
char name2[(int)&((struct ArrayStruct*)0)->n - 1]; // expected-warning {{folded to constant array}} \
123122
// pedantic-expected-warning {{folded to constant array}} \
124123
// ref-error {{array size is negative}} \
125-
// ref-warning {{cast to smaller integer type}} \
126-
// pedantic-ref-error {{array size is negative}} \
127-
// pedantic-ref-warning {{cast to smaller integer type}}
124+
// pedantic-ref-error {{array size is negative}}
128125
};
129126
_Static_assert(sizeof(struct AA) == 15, ""); // ref-error {{failed}} \
130-
// ref-note {{1 == 15}} \
127+
// ref-note {{ == 15}} \
131128
// pedantic-ref-error {{failed}} \
132-
// pedantic-ref-note {{1 == 15}}
129+
// pedantic-ref-note {{ == 15}}

0 commit comments

Comments
 (0)