]> granicus.if.org Git - clang/commitdiff
Fix case where we should use dyn_cast instead of cast.
authorTed Kremenek <kremenek@apple.com>
Tue, 3 Mar 2009 19:01:37 +0000 (19:01 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 3 Mar 2009 19:01:37 +0000 (19:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65956 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/SVals.cpp

index 824d7229a33abfe7242026dd7f37d10abb985a29..2017c4bc6e8e6e6e63b1865ad2361beade01f56c 100644 (file)
@@ -288,7 +288,7 @@ NonLoc NonLoc::MakeCompoundVal(QualType T, llvm::ImmutableList<SVal> Vals,
 SVal SVal::GetRValueSymbolVal(SymbolManager& SymMgr, const MemRegion* R) {
   SymbolRef sym = SymMgr.getRegionRValueSymbol(R);
                                 
-  if (const TypedRegion* TR = cast<TypedRegion>(R))
+  if (const TypedRegion* TR = dyn_cast<TypedRegion>(R))
     if (Loc::IsLocType(TR->getRValueType(SymMgr.getContext())))
       return Loc::MakeVal(sym);