diff options
author | Endre Fulop <endre.fulop@sigmatechnology.se> | 2019-07-08 12:37:10 +0000 |
---|---|---|
committer | Endre Fulop <endre.fulop@sigmatechnology.se> | 2019-07-08 12:37:10 +0000 |
commit | 0752d12c0910ece5041806e5d967ce48039df9f7 (patch) | |
tree | e0e7074093460602be54c9e212f9a008a69c587b /clang/test | |
parent | 1602058c04541cb65e078e9f86deca21052b3801 (diff) | |
download | bcm5719-llvm-0752d12c0910ece5041806e5d967ce48039df9f7.tar.gz bcm5719-llvm-0752d12c0910ece5041806e5d967ce48039df9f7.zip |
[analyzer] Add analyzer option to limit the number of imported TUs
Summary:
During CTU analysis of complex projects, the loaded AST-contents of
imported TUs can grow bigger than available system memory. This option
introduces a threshold on the number of TUs to be imported for a single
TU in order to prevent such cases.
Differential Revision: https://reviews.llvm.org/D59798
llvm-svn: 365314
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Analysis/analyzer-config.c | 3 | ||||
-rw-r--r-- | clang/test/Analysis/ctu-import-threshold.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/clang/test/Analysis/analyzer-config.c b/clang/test/Analysis/analyzer-config.c index 9ceb8e94727..26fa5d22068 100644 --- a/clang/test/Analysis/analyzer-config.c +++ b/clang/test/Analysis/analyzer-config.c @@ -27,6 +27,7 @@ // CHECK-NEXT: cplusplus.Move:WarnOn = KnownsAndLocals // CHECK-NEXT: crosscheck-with-z3 = false // CHECK-NEXT: ctu-dir = "" +// CHECK-NEXT: ctu-import-threshold = 100 // CHECK-NEXT: ctu-index-name = externalDefMap.txt // CHECK-NEXT: debug.AnalysisOrder:* = false // CHECK-NEXT: debug.AnalysisOrder:Bind = false @@ -90,4 +91,4 @@ // CHECK-NEXT: unroll-loops = false // CHECK-NEXT: widen-loops = false // CHECK-NEXT: [stats] -// CHECK-NEXT: num-entries = 87 +// CHECK-NEXT: num-entries = 88 diff --git a/clang/test/Analysis/ctu-import-threshold.c b/clang/test/Analysis/ctu-import-threshold.c new file mode 100644 index 00000000000..82711b873d1 --- /dev/null +++ b/clang/test/Analysis/ctu-import-threshold.c @@ -0,0 +1,5 @@ +// Ensure analyzer option 'ctu-import-threshold' is a recognized option. +// +// RUN: %clang_cc1 -analyze -analyzer-config ctu-import-threshold=30 -verify %s +// +// expected-no-diagnostics |