diff options
author | Michael Spencer <bigcheesegs@gmail.com> | 2024-02-20 15:20:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 15:20:40 -0800 |
commit | 3ff805540173b83d73b673b39ac5760fc19bac15 (patch) | |
tree | dd2b60d0b28f7748977af42b5cf2d993a0cb1693 /clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | |
parent | 54b014b3f76e1c0060bd129e1196b6c729cb30b0 (diff) | |
download | llvm-3ff805540173b83d73b673b39ac5760fc19bac15.zip llvm-3ff805540173b83d73b673b39ac5760fc19bac15.tar.gz llvm-3ff805540173b83d73b673b39ac5760fc19bac15.tar.bz2 |
[clang][ScanDeps] Canonicalize -D and -U flags (#82298)
Canonicalize `-D` and `-U` flags by sorting them and only keeping the
last instance of a given name.
This optimization will only fire if all `-D` and `-U` flags start with a
simple identifier that we can guarantee a simple analysis of can
determine if two flags refer to the same identifier or not. See the
comment on `getSimpleMacroName()` for details of what the issues are.
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp')
0 files changed, 0 insertions, 0 deletions