commit | 5609e213374fbaccd17ee8504266cfae805e7573 | [log] [tgz] |
---|---|---|
author | Zhongxing Xu <xuzhongxing@gmail.com> | Mon Jan 10 03:54:19 2011 +0000 |
committer | Zhongxing Xu <xuzhongxing@gmail.com> | Mon Jan 10 03:54:19 2011 +0000 |
tree | 68ab7476cb26decf628c044e826b0a7e73d679aa | |
parent | 1bf55f2af74a8401ab2b868db61423a82d4bf71c [diff] [blame] |
In C++, assignment and compound assignment operators return an lvalue. llvm-svn: 123158
diff --git a/clang/test/Analysis/lvalue.cpp b/clang/test/Analysis/lvalue.cpp new file mode 100644 index 0000000..f19c59d --- /dev/null +++ b/clang/test/Analysis/lvalue.cpp
@@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store=region -verify %s + +int f1() { + int x = 0, y = 1; + return x += y; // Should bind a location to 'x += y'. No crash. +}