summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis
diff options
context:
space:
mode:
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