diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-02-20 05:52:05 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-02-20 05:52:05 +0000 |
commit | 2fdacbc5b07d46b78710574e8817e58899ae8948 (patch) | |
tree | b0082b91bda7317005f07a3dcf5a1dc384d2b15f /clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | |
parent | 7b503c2b03b60de6ee51ba84f17c187b3d354a2d (diff) | |
download | bcm5719-llvm-2fdacbc5b07d46b78710574e8817e58899ae8948.tar.gz bcm5719-llvm-2fdacbc5b07d46b78710574e8817e58899ae8948.zip |
Replace SVal llvm::cast support to be well-defined.
See r175462 for another example/more details.
llvm-svn: 175594
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index 533d0b84200..cb731fcee14 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -3361,7 +3361,8 @@ void RetainCountChecker::checkBind(SVal loc, SVal val, const Stmt *S, // does not understand. ProgramStateRef state = C.getState(); - if (loc::MemRegionVal *regionLoc = dyn_cast<loc::MemRegionVal>(&loc)) { + if (llvm::Optional<loc::MemRegionVal> regionLoc = + loc.getAs<loc::MemRegionVal>()) { escapes = !regionLoc->getRegion()->hasStackStorage(); if (!escapes) { |