-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
libs/preprocessor/tests/warnings/pw3_padded_arg_inner/source.hpp
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,6 @@ | ||
#define HELLO(var1, var2) INNER(Hello, var1##var2) | ||
#define GREET(var1, var2) INNER(Greetings, var1##var2) | ||
#define INNER(var1, var2) var1 var2 | ||
|
||
value1 = HELLO(John,Smith); // Only inner | ||
value2 = GREET(John, Smith); // Both call and inner |
27 changes: 27 additions & 0 deletions
27
libs/preprocessor/tests/warnings/pw3_padded_arg_inner/stderr.ansi
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,27 @@ | ||
[0m[1m[38;5;11mwarning[PW3][0m[1m: padding a macro argument[0m | ||
[0m[36m┌─[0m source.hpp:1:39 | ||
[0m[36m│[0m | ||
[0m[36m1[0m [0m[36m│[0m #define HELLO(var1, var2) INNER(Hello,[0m[33m [0mvar1##var2) | ||
[0m[36m│[0m [0m[33m^[0m [0m[33mpadding a macro argument[0m | ||
[0m[36m│[0m | ||
[0m[36m=[0m [36mnote[0m: padding a macro argument is likely unintended | ||
[0m[36m=[0m [36mnote[0m: occured in: `INNER` | ||
|
||
[0m[1m[38;5;11mwarning[PW3][0m[1m: padding a macro argument[0m | ||
[0m[36m┌─[0m source.hpp:6:21 | ||
[0m[36m│[0m | ||
[0m[36m6[0m [0m[36m│[0m value2 = GREET(John,[0m[33m [0mSmith); // Both call and inner | ||
[0m[36m│[0m [0m[33m^[0m [0m[33mpadding a macro argument[0m | ||
[0m[36m│[0m | ||
[0m[36m=[0m [36mnote[0m: padding a macro argument is likely unintended | ||
[0m[36m=[0m [36mnote[0m: occured in: `GREET` | ||
|
||
[0m[1m[38;5;11mwarning[PW3][0m[1m: padding a macro argument[0m | ||
[0m[36m┌─[0m source.hpp:2:43 | ||
[0m[36m│[0m | ||
[0m[36m2[0m [0m[36m│[0m #define GREET(var1, var2) INNER(Greetings,[0m[33m [0mvar1##var2) | ||
[0m[36m│[0m [0m[33m^[0m [0m[33mpadding a macro argument[0m | ||
[0m[36m│[0m | ||
[0m[36m=[0m [36mnote[0m: padding a macro argument is likely unintended | ||
[0m[36m=[0m [36mnote[0m: occured in: `INNER` | ||
|