summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-31 05:10:27 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-31 05:10:27 +0000
commitf5d453d067df9020d04a0c823712468e7a30269d (patch)
tree7845fd0ec9a817ffae577c36b9a3ab35f73bf2a4 /clang/test/Analysis
parent7dcb155c1845d3ed50a98d3d294fae0c4eb6b77d (diff)
downloadbcm5719-llvm-f5d453d067df9020d04a0c823712468e7a30269d.tar.gz
bcm5719-llvm-f5d453d067df9020d04a0c823712468e7a30269d.zip
Teach the CFGBuilder not do die on CXXBindTemporaryExpr, CXXOperatorCallExpr. Fixes a Boost.Graph crasher.
llvm-svn: 112578
Diffstat (limited to 'clang/test/Analysis')
-rw-r--r--clang/test/Analysis/temporaries.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Analysis/temporaries.cpp b/clang/test/Analysis/temporaries.cpp
new file mode 100644
index 00000000000..602948af5c8
--- /dev/null
+++ b/clang/test/Analysis/temporaries.cpp
@@ -0,0 +1,13 @@
+// // RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-inline-call -analyzer-store region -verify %s
+
+// FIXME: Super-simple test to make sure we don't die on temporaries.
+
+struct X {
+ X();
+ ~X();
+ X operator++(int);
+};
+
+int f(X x, X y) {
+ for (; ; x++) { }
+}
OpenPOWER on IntegriCloud