Skip to content

Commit 588ba09

Browse files
committed
Fixing an invalid test
Putting the attribute after the declarator has different behavior than putting it before or on the type itself; the expected diagnostics were not triggered. This was caught by precommit CI. My local testing did not catch it because I was accidentally testing noderef.c instead of noderef.cpp. This removes the expected diagnostics and just leaves in the "does not crash" test.
1 parent c46fabd commit 588ba09

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/test/Frontend/noderef.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,5 @@ const int *const_cast_check(NODEREF int *x) {
186186

187187
namespace GH116124 {
188188
// This declaration would previously cause a failed assertion.
189-
int *_Atomic a __attribute__((noderef)); // expected-note {{declared here}}
190-
int x = *a; // expected-warning{{dereferencing a; was declared with a 'noderef' type}}
189+
int *_Atomic a __attribute__((noderef));
191190
}

0 commit comments

Comments
 (0)