-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add support for c++23 elifdef and elifndef
- Loading branch information
1 parent
bec4386
commit 94c0ec0
Showing
3 changed files
with
68 additions
and
2 deletions.
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
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
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,41 @@ | ||
// RUN: %cxx -E %s -o - | %filecheck %s | ||
|
||
#define B | ||
|
||
#ifdef A | ||
int a_not_reachable; | ||
#elifdef B | ||
int b_reachable; | ||
#elifdef C | ||
int c_not_reachable; | ||
#else | ||
int else_not_reachable; | ||
#endif | ||
|
||
// CHECK: b_reachable; | ||
|
||
#ifdef AA | ||
int aa_not_reachable; | ||
#elifndef BB | ||
int bb_reachable; | ||
#elifndef CC | ||
int cc_not_reachable; | ||
#elifdef DD | ||
int dd_not_reachable; | ||
#else | ||
int else_not_reachable; | ||
#endif | ||
|
||
// CHECK: bb_reachable; | ||
|
||
#ifdef AAA | ||
int aaa_not_reachable; | ||
#elifdef BBB | ||
int bbb_not_reachable; | ||
#elifdef CCC | ||
int ccc_not_reachable; | ||
#else | ||
int else_reachable; | ||
#endif | ||
|
||
// CHECK: else_reachable; |