[clang] 73e5466 - [clang][Interp] Fix up broken test case
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 2 01:11:40 PST 2024
Author: Timm Bäder
Date: 2024-02-02T10:11:29+01:00
New Revision: 73e546625d6567e5a33454741d257b6929c89635
URL: https://github.com/llvm/llvm-project/commit/73e546625d6567e5a33454741d257b6929c89635
DIFF: https://github.com/llvm/llvm-project/commit/73e546625d6567e5a33454741d257b6929c89635.diff
LOG: [clang][Interp] Fix up broken test case
This was not working right on armv8:
https://lab.llvm.org/buildbot/#/builders/245/builds/20020
Added:
Modified:
clang/test/AST/Interp/c.c
Removed:
################################################################################
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}}
More information about the cfe-commits
mailing list