[clang] [clang][analyzer] Add plist macro formatting (PR #156046)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 2 02:37:09 PDT 2025
steakhal wrote:
> Can't find any unit tests for methods in PlistDiagnostics.cpp
>
> So adding the unit test in `clang/unittests/Analysis/MacroExpansionContextTest.cpp` Since it contains some similar MacroExpansionContextTest functionality tests. Also, since the newly defined function `getFormattedMacro` is static , should i just duplicate it in the testing file or how should i proceed ?
Yes, I had `MacroExpansionContextTest` in mind, exactly.
Wrt. the second part; would it make sense to move this formatting functionality into the `MacroExpansionContext`?
I'd go as far as caching these formatted strings for the expansion locations to avoid potential duplicated queries. Frequently, bug reports cross the same macro expansions by nature, thus this might save some time. WDYT?
https://github.com/llvm/llvm-project/pull/156046
More information about the cfe-commits
mailing list