commit | 7a95de68c093991047ed8d339479ccad51b88663 | [log] [tgz] |
---|---|---|
author | David Blaikie <dblaikie@gmail.com> | Thu Feb 21 22:23:56 2013 +0000 |
committer | David Blaikie <dblaikie@gmail.com> | Thu Feb 21 22:23:56 2013 +0000 |
tree | 30fb6ba3d10757a7453dab5e854dc12db3cd1168 | |
parent | 94f3f549a7e0c426d5ffda7f25d1983c885dab9c [diff] [blame] |
Replace ProgramPoint llvm::cast support to be well-defined. See r175462 for another example/more details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175812 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp b/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp index c939d05..3b4aa23 100644 --- a/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
@@ -76,7 +76,7 @@ if (!PM) PM = &LC->getParentMap(); - if (const BlockEntrance *BE = dyn_cast<BlockEntrance>(&P)) { + if (Optional<BlockEntrance> BE = P.getAs<BlockEntrance>()) { const CFGBlock *CB = BE->getBlock(); reachable.insert(CB->getBlockID()); }