aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/CrossTU
diff options
context:
space:
mode:
authorGabor Marton <gabor.marton@ericsson.com>2020-07-09 14:26:23 +0200
committerGabor Marton <gabor.marton@ericsson.com>2020-07-09 15:36:33 +0200
commitd12d0b73f1c9c3a711c5cc15266a2b493cd712e9 (patch)
tree501468c5623db7898fcbb8c1464943a42d1a9f72 /clang/unittests/CrossTU
parent31b05692cd33b6dcc39402169b36d895e1aa87f4 (diff)
downloadllvm-d12d0b73f1c9c3a711c5cc15266a2b493cd712e9.zip
llvm-d12d0b73f1c9c3a711c5cc15266a2b493cd712e9.tar.gz
llvm-d12d0b73f1c9c3a711c5cc15266a2b493cd712e9.tar.bz2
[analyzer] Add CTUImportCppThreshold for C++ files
Summary: 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. Differential Revision: https://reviews.llvm.org/D83475
Diffstat (limited to 'clang/unittests/CrossTU')
-rw-r--r--clang/unittests/CrossTU/CrossTranslationUnitTest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp b/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp
index ceb1437..5495f27 100644
--- a/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp
+++ b/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp
@@ -147,6 +147,7 @@ protected:
std::unique_ptr<clang::ASTConsumer>
CreateASTConsumer(clang::CompilerInstance &CI, StringRef) override {
CI.getAnalyzerOpts()->CTUImportThreshold = OverrideLimit;
+ CI.getAnalyzerOpts()->CTUImportCppThreshold = OverrideLimit;
return std::make_unique<CTUASTConsumer>(CI, Success);
}