diff options
Diffstat (limited to 'tests/diagnostics')
| -rw-r--r-- | tests/diagnostics/token-paste-location.slang | 14 | ||||
| -rw-r--r-- | tests/diagnostics/token-paste-location.slang.expected | 7 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/diagnostics/token-paste-location.slang b/tests/diagnostics/token-paste-location.slang new file mode 100644 index 000000000..4da66bab3 --- /dev/null +++ b/tests/diagnostics/token-paste-location.slang @@ -0,0 +1,14 @@ +//DIAGNOSTIC_TEST:SIMPLE: + + +#define SOME % +#define THING % + +#define A SOME +#define B THING + +#define PASTE2(x, y) x##y +#define PASTE(x, y) PASTE2(x, y) + + +PASTE(A, B) diff --git a/tests/diagnostics/token-paste-location.slang.expected b/tests/diagnostics/token-paste-location.slang.expected new file mode 100644 index 000000000..e8f689a45 --- /dev/null +++ b/tests/diagnostics/token-paste-location.slang.expected @@ -0,0 +1,7 @@ +result code = -1 +standard error = { +token paste(1): error 20001: unexpected '%', expected identifier +tests/diagnostics/token-paste-location.slang(10): note: see token pasted location +} +standard output = { +} |
