summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-09-01 17:39:09 +0000
committerJordan Rose <jordan_rose@apple.com>2012-09-01 17:39:09 +0000
commit82ae9898efba917c149bcb7eea611756f93df0f7 (patch)
tree2457285610e7abdb187ce0784d80aed59a327e42 /clang/lib/StaticAnalyzer/Core/SymbolManager.cpp
parent2da564380a0efe084ede1e5ed7d22348c79aeb0e (diff)
downloadbcm5719-llvm-82ae9898efba917c149bcb7eea611756f93df0f7.tar.gz
bcm5719-llvm-82ae9898efba917c149bcb7eea611756f93df0f7.zip
[analyzer] Treat all struct values as regions (even rvalues).
This allows us to correctly symbolicate the fields of structs returned by value, as well as get the proper 'this' value for when methods are called on structs returned by value. This does require a moderately ugly hack in the StoreManager: if we assign a "struct value" to a struct region, that now appears as a Loc value being bound to a region of struct type. We handle this by simply "dereferencing" the struct value region, which should create a LazyCompoundVal. This should fix recent crashes analyzing LLVM and on our internal buildbot. <rdar://problem/12137950> llvm-svn: 163066
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/SymbolManager.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/SymbolManager.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp b/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp
index c21df4c3181..65356a9458a 100644
--- a/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp
+++ b/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp
@@ -365,9 +365,6 @@ bool SymbolManager::canSymbolicate(QualType T) {
if (T->isIntegerType())
return T->isScalarType();
- if (T->isRecordType() && !T->isUnionType())
- return true;
-
return false;
}
OpenPOWER on IntegriCloud