diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-04-02 00:26:35 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-04-02 00:26:35 +0000 |
commit | c63a460d78a7625ff38d2b3580f78030c44f07db (patch) | |
tree | 92f8f273c29d583cb32ed3fabc63c67cd5473937 /test/Analysis/analyzer-config.cpp | |
parent | c9092bb5eb67d859122abb69a0ef61e9249500cd (diff) |
[analyzer] For now, don't inline [cd]tors of C++ containers.
This is a heuristic to make up for the fact that the analyzer doesn't
model C++ containers very well. One example is modeling that
'std::distance(I, E) == 0' implies 'I == E'. In the future, it would be
nice to model this explicitly, but for now it just results in a lot of
false positives.
The actual heuristic checks if the base type has a member named 'begin' or
'iterator'. If so, we treat the constructors and destructors of that type
as opaque, rather than inlining them.
This is intended to drastically reduce the number of false positives
reported with experimental destructor support turned on. We can tweak the
heuristic in the future, but we'd rather err on the side of false negatives
for now.
<rdar://problem/13497258>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/analyzer-config.cpp')
-rw-r--r-- | test/Analysis/analyzer-config.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Analysis/analyzer-config.cpp b/test/Analysis/analyzer-config.cpp index c3a04c946e..df1d486797 100644 --- a/test/Analysis/analyzer-config.cpp +++ b/test/Analysis/analyzer-config.cpp @@ -11,6 +11,7 @@ public: }; // CHECK: [config] +// CHECK-NEXT: c++-container-inlining = false // CHECK-NEXT: c++-inlining = constructors // CHECK-NEXT: c++-stdlib-inlining = true // CHECK-NEXT: c++-template-inlining = true @@ -25,4 +26,4 @@ public: // CHECK-NEXT: max-times-inline-large = 32 // CHECK-NEXT: mode = deep // CHECK-NEXT: [stats] -// CHECK-NEXT: num-entries = 13 +// CHECK-NEXT: num-entries = 14 |