diff options
author | Anna Zaks <ganna@apple.com> | 2012-05-24 17:31:57 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-05-24 17:31:57 +0000 |
commit | d0867105f4824a630f898422c4ef31708e0ad90e (patch) | |
tree | 061f387ce2e93c2693df87afc1da89269ba53046 /clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | |
parent | cb4c483dbe657e632df8ff5099dc9d0fb108393f (diff) | |
download | bcm5719-llvm-d0867105f4824a630f898422c4ef31708e0ad90e.tar.gz bcm5719-llvm-d0867105f4824a630f898422c4ef31708e0ad90e.zip |
[analyzer] Treat cast of array to reference in the same way as array to
pointer.
Fixes one of the crashes reported in PR12874.
llvm-svn: 157401
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/SValBuilder.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp b/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp index d005c2af966..765ae48c73e 100644 --- a/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp +++ b/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp @@ -325,7 +325,7 @@ SVal SValBuilder::evalCast(SVal val, QualType castTy, QualType originalTy) { // Are we casting from an array to a pointer? If so just pass on // the decayed value. - if (castTy->isPointerType()) + if (castTy->isPointerType() || castTy->isReferenceType()) return val; // Are we casting from an array to an integer? If so, cast the decayed |