summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/RegionStore.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-08-17 23:29:06 +0000
committerTed Kremenek <kremenek@apple.com>2010-08-17 23:29:06 +0000
commit5322150a7f9148acf48321b5cf0f5f8284c64fd5 (patch)
tree5c85880ee4a64863cb21135faa160efe9a3e7ce0 /clang/lib/Checker/RegionStore.cpp
parent249b976ed2421c6d2ce1ac33245c5951f5b89667 (diff)
downloadbcm5719-llvm-5322150a7f9148acf48321b5cf0f5f8284c64fd5.tar.gz
bcm5719-llvm-5322150a7f9148acf48321b5cf0f5f8284c64fd5.zip
Rewrite code fragment to avoide ICE in MSVC. Fixes PR 7875. Patch by Dimitry Andric!
llvm-svn: 111327
Diffstat (limited to 'clang/lib/Checker/RegionStore.cpp')
-rw-r--r--clang/lib/Checker/RegionStore.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Checker/RegionStore.cpp b/clang/lib/Checker/RegionStore.cpp
index 9b8579cdeb2..d6422ab338f 100644
--- a/clang/lib/Checker/RegionStore.cpp
+++ b/clang/lib/Checker/RegionStore.cpp
@@ -1538,8 +1538,10 @@ Store RegionStoreManager::BindStruct(Store store, const TypedRegion* R,
// We may get non-CompoundVal accidentally due to imprecise cast logic or
// that we are binding symbolic struct value. Kill the field values, and if
// the value is symbolic go and bind it as a "default" binding.
- if (V.isUnknown() || !isa<nonloc::CompoundVal>(V))
- return KillStruct(store, R, isa<nonloc::SymbolVal>(V) ? V : UnknownVal());
+ if (V.isUnknown() || !isa<nonloc::CompoundVal>(V)) {
+ SVal SV = isa<nonloc::SymbolVal>(V) ? V : UnknownVal();
+ return KillStruct(store, R, SV);
+ }
nonloc::CompoundVal& CV = cast<nonloc::CompoundVal>(V);
nonloc::CompoundVal::iterator VI = CV.begin(), VE = CV.end();
OpenPOWER on IntegriCloud