summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/virtualcall.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2018-01-24 20:59:40 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2018-01-24 20:59:40 +0000
commita396df34725fcbb03a96ba196b58eb2244447df7 (patch)
treeb41f936978748f435bcd0bc9d4b8002c1a21bbed /clang/test/Analysis/virtualcall.cpp
parent538921dc86a5b82b7d8df92366bb8d8357071d20 (diff)
downloadbcm5719-llvm-a396df34725fcbb03a96ba196b58eb2244447df7.tar.gz
bcm5719-llvm-a396df34725fcbb03a96ba196b58eb2244447df7.zip
[analyzer] Enable c++-allocator-inlining by default.
This allows the analyzer to analyze ("inline") custom operator new() calls and, even more importantly, inline constructors of objects that were allocated by any operator new() - not necessarily a custom one. All changes in the tests in the current commit are intended improvements, even if they didn't carry any explicit FIXME flag. It is possible to restore the old behavior via -analyzer-config c++-allocator-inlining=false (this flag is supported by scan-build as well, and it can be into a clang --analyze invocation via -Xclang .. -Xclang ..). There is no intention to remove the old behavior for now. Differential Revision: https://reviews.llvm.org/D42219 rdar://problem/12180598 llvm-svn: 323373
Diffstat (limited to 'clang/test/Analysis/virtualcall.cpp')
-rw-r--r--clang/test/Analysis/virtualcall.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Analysis/virtualcall.cpp b/clang/test/Analysis/virtualcall.cpp
index c22a8463c04..1929abf6f0a 100644
--- a/clang/test/Analysis/virtualcall.cpp
+++ b/clang/test/Analysis/virtualcall.cpp
@@ -262,6 +262,9 @@ int main() {
//expected-note-re@-2 {{{{^}}Calling default constructor for 'M'}}
#endif
Y *y = new Y;
+#if !PUREONLY
+ //expected-note-re@-2 {{{{^}}Calling default constructor for 'Y'}}
+#endif
delete y;
header::Z z;
#if !PUREONLY
OpenPOWER on IntegriCloud