[clang] [clang] consistently quote expressions in diagnostics (PR #134769)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 9 18:19:45 PDT 2025
================
@@ -18,19 +18,19 @@ int D = 1;
#pragma data_seg(".data")
int a = 1;
extern const Mutable mutable_custom_section;
-const Mutable mutable_custom_section; // expected-warning {{`#pragma const_seg` for section ".my_const" will not apply to 'mutable_custom_section' due to the presence of a mutable field}}
+const Mutable mutable_custom_section; // expected-warning {{`#pragma const_seg` for section '".my_const"' will not apply to 'mutable_custom_section' due to the presence of a mutable field}}
----------------
mizvekov wrote:
Yeah this is printing the string expression, instead of resolving it to the actual section name.
I think that this was bad to start with, and the fact this now gets quoted doesn't make that much worse.
I was trying to avoid fixing yet another pre-existing diagnostic issue and making this patch more complicated than it strictly needs to be.
https://github.com/llvm/llvm-project/pull/134769
More information about the cfe-commits
mailing list