diff options
Diffstat (limited to 'clang/lib/Checker/SVals.cpp')
-rw-r--r-- | clang/lib/Checker/SVals.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Checker/SVals.cpp b/clang/lib/Checker/SVals.cpp index 7a99e8681df..3248b0fea25 100644 --- a/clang/lib/Checker/SVals.cpp +++ b/clang/lib/Checker/SVals.cpp @@ -62,6 +62,9 @@ const FunctionDecl *SVal::getAsFunctionDecl() const { /// wraps a symbol, return that SymbolRef. Otherwise return 0. // FIXME: should we consider SymbolRef wrapped in CodeTextRegion? SymbolRef SVal::getAsLocSymbol() const { + if (const nonloc::LocAsInteger *X = dyn_cast<nonloc::LocAsInteger>(this)) + return X->getLoc().getAsLocSymbol(); + if (const loc::MemRegionVal *X = dyn_cast<loc::MemRegionVal>(this)) { const MemRegion *R = X->StripCasts(); if (const SymbolicRegion *SymR = dyn_cast<SymbolicRegion>(R)) |