summaryrefslogtreecommitdiff
path: root/clang/test/Analysis/lvalue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/lvalue.cpp')
-rw-r--r--clang/test/Analysis/lvalue.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Analysis/lvalue.cpp b/clang/test/Analysis/lvalue.cpp
new file mode 100644
index 0000000..0cc42f5
--- /dev/null
+++ b/clang/test/Analysis/lvalue.cpp
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s
+
+int f1() {
+ int x = 0, y = 1;
+ return x += y; // Should bind a location to 'x += y'. No crash.
+}