[clang] [clang][analyzer] Add plist macro formatting (PR #156046)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 25 08:10:07 PST 2025
================
@@ -351,6 +351,11 @@ ANALYZER_OPTION(bool, ShouldDisplayMacroExpansions, "expand-macros",
"expanded and included in the plist output.",
false)
+ANALYZER_OPTION(bool, ShouldFormatMacrosPlist, "format-macros-plist",
+ "Whether the macros being displayed in the plist "
+ "files are clang-formatted .",
+ false)
----------------
steakhal wrote:
I see your problem. I think there is a way.
How about we only check the prefix of the matched lines. (this is what FileCheck does by default for CHECK lines)
So, I think it's fair to assume that a macro in these tests will start without any leading whitespaces, and then the first token the macro would expand to; and after that just not check the rest of the line.
This way we still have something, and that is still stable to the reasonable degree.
WDYT?
https://github.com/llvm/llvm-project/pull/156046
More information about the cfe-commits
mailing list