Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional test coverage for C2x N2508
This spotted a mistake with the original patch, so it puts the status back to "partial" in the C status tracking page. This amends 5103836.
- Loading branch information
1 parent
8206044
commit a244194
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// RUN: %clang_cc1 -verify -std=c2x %s | ||
|
||
/* WG14 N2508: partial | ||
* Free positioning of labels inside compound statements | ||
*/ | ||
void test() { | ||
{ | ||
inner: | ||
} | ||
|
||
switch (1) { | ||
// FIXME: this should be accepted per C2x 6.8.2p2. | ||
case 1: // expected-error {{label at end of switch compound statement: expected statement}} | ||
} | ||
|
||
{ | ||
multiple: labels: on: a: line: | ||
} | ||
|
||
final: | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters