From 8cbe9ffee1b38255183c5899a3601f1372e77abe Mon Sep 17 00:00:00 2001 From: Eathox Date: Sun, 10 Nov 2024 05:16:11 +0100 Subject: [PATCH] Attempt to clarify pw3_padded_arg_inner test I saw your comment Brett, before you deleted it, hopefully this makes it slightly clearer at what my intention was and with this test and why there are two identical macros defined. --- .../warnings/pw3_padded_arg_inner/source.hpp | 8 ++++---- .../warnings/pw3_padded_arg_inner/stderr.ansi | 20 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libs/preprocessor/tests/warnings/pw3_padded_arg_inner/source.hpp b/libs/preprocessor/tests/warnings/pw3_padded_arg_inner/source.hpp index 661f2eb9..f6f9eae8 100644 --- a/libs/preprocessor/tests/warnings/pw3_padded_arg_inner/source.hpp +++ b/libs/preprocessor/tests/warnings/pw3_padded_arg_inner/source.hpp @@ -1,6 +1,6 @@ -#define HELLO(var1, var2) INNER(Hello, var1##var2) -#define GREET(var1, var2) INNER(Greetings, var1##var2) +#define TEST1(var1, var2) INNER(var1, var2) +#define TEST2(var1, var2) INNER(var1, var2) // Separate macro to trigger unique warning for INNER padding #define INNER(var1, var2) var1 var2 -value1 = HELLO(John,Smith); // Only inner -value2 = GREET(John, Smith); // Both call and inner +TEST1(John,Smith); // Only inner +TEST2(John, Smith); // Both call and inner diff --git a/libs/preprocessor/tests/warnings/pw3_padded_arg_inner/stderr.ansi b/libs/preprocessor/tests/warnings/pw3_padded_arg_inner/stderr.ansi index 89a3bb51..feb57506 100644 --- a/libs/preprocessor/tests/warnings/pw3_padded_arg_inner/stderr.ansi +++ b/libs/preprocessor/tests/warnings/pw3_padded_arg_inner/stderr.ansi @@ -1,26 +1,26 @@ warning[PW3]: padding a macro argument - ┌─ source.hpp:1:39 + ┌─ source.hpp:1:38 │ -1 │ #define HELLO(var1, var2) INNER(Hello, var1##var2) - │ ^ padding a macro argument +1 │ #define TEST1(var1, var2) INNER(var1, var2) + │ ^ padding a macro argument │ = note: padding a macro argument is likely unintended = note: occured in: `INNER` warning[PW3]: padding a macro argument - ┌─ source.hpp:6:21 + ┌─ source.hpp:6:12 │ -6 │ value2 = GREET(John, Smith); // Both call and inner - │ ^ padding a macro argument +6 │ TEST2(John, Smith); // Both call and inner + │ ^ padding a macro argument │ = note: padding a macro argument is likely unintended - = note: occured in: `GREET` + = note: occured in: `TEST2` warning[PW3]: padding a macro argument - ┌─ source.hpp:2:43 + ┌─ source.hpp:2:38 │ -2 │ #define GREET(var1, var2) INNER(Greetings, var1##var2) - │ ^ padding a macro argument +2 │ #define TEST2(var1, var2) INNER(var1, var2) // Separate macro to trigger unique warning for INNER padding + │ ^ padding a macro argument │ = note: padding a macro argument is likely unintended = note: occured in: `INNER`