Skip to content

Commit c0fbe17

Browse files
committed
Repair OpenMP test
1 parent 485c548 commit c0fbe17

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

clang/test/OpenMP/assumes_messages.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,14 @@
5959
#pragma omp begin assumes ext // expected-warning {{valid begin assumes clauses start with 'ext_', 'absent', 'contains', 'holds', 'no_openmp', 'no_openmp_routines', 'no_openmp_constructs', 'no_parallelism'; token will be ignored}}
6060
#pragma omp end assumes
6161

62-
#pragma omp assumes ext_123(not allowed) // expected-warning {{'ext_123' clause should not be followed by arguments; tokens will be ignored}} expected-note {{the ignored tokens spans until here}}
63-
#pragma omp begin assumes ext_123(not allowed) // expected-warning {{'ext_123' clause should not be followed by arguments; tokens will be ignored}} expected-note {{the ignored tokens spans until here}}
62+
// FIXME: We should be getting an expected note about where the span of ignored
63+
// tokens ends. However, error recovery ends up lexing the 'not' token,
64+
// emitting a (silenced) diagnostic about use of a C++ keyword in C, and the
65+
// note gets associated with *that* (silenced) diagnostic. This is an existing
66+
// issue that also happens with error recovery of reserved identifiers or
67+
// extension tokens, but is unfortunate nonetheless.
68+
#pragma omp assumes ext_123(not allowed) // expected-warning {{'ext_123' clause should not be followed by arguments; tokens will be ignored}}
69+
#pragma omp begin assumes ext_123(not allowed) // expected-warning {{'ext_123' clause should not be followed by arguments; tokens will be ignored}}
6470
#pragma omp end assumes
6571

6672
#pragma omp end assumes // expected-error {{'#pragma omp end assumes' with no matching '#pragma omp begin assumes'}}

0 commit comments

Comments
 (0)