The default CTUImportThreshold (8) seems to be too conservative with C projects.
We increase this value to 24 and we introduce another threshold for C++ source
files (defaulted to 8) because their AST is way more compilcated than C source
files.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
It will be interesting to see how different C and C++ projects will prove in terms of AST complexity, and Decl-size, but I understand that for now, these two options are necessary to not penalize C project analysis because of C++ AST complexity.
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def | ||
---|---|---|
333 | extra whitespace at the end |
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def | ||
---|---|---|
48–50 | This reminds me of some options having different default values depending on -analyzer-config user-mode. I think that solution, and the one proposed in this patch is subpar, but the best solution, turning this entire thing into a TableGen file, would be a chore. |
I don't like this solution toooo much, but I respect the urgency, and since we don't introduce a compatibility issue, I trust we can remove this if we decide to change to TableGen. Post-commit LGTM!
This reminds me of some options having different default values depending on -analyzer-config user-mode. I think that solution, and the one proposed in this patch is subpar, but the best solution, turning this entire thing into a TableGen file, would be a chore.