diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-01-09 09:16:47 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-01-09 09:16:47 +0000 |
commit | bc37b8dd9914e02580f531fa6e5e72be34d9675e (patch) | |
tree | e1dfe8fab77de3a9ff2679dbb4ea65749aeb6007 /test/Analysis/reference.cpp | |
parent | 7a7ca281bcf50b34de1ce067d3c55879b81722ae (diff) |
When binding an rvalue to a reference, create a temporary object. Use
CXXObjectRegion to represent it.
In Environment, lookup a literal expression before make up a value for it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93047 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/reference.cpp')
-rw-r--r-- | test/Analysis/reference.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Analysis/reference.cpp b/test/Analysis/reference.cpp new file mode 100644 index 0000000000..941147b9b2 --- /dev/null +++ b/test/Analysis/reference.cpp @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s + +void f1() { + int const &i = 3; + int b = i; +} |