summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-02-21 22:23:56 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-02-21 22:23:56 +0000
commit87396b9b08551ff86a788ff41da17b71e4dd4820 (patch)
tree72291e2d2cbf8ad3c7ef2d33faf410c3ef15a469 /clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
parent5251e573d14d5a8d211812120f07f45fbf9cbdc0 (diff)
downloadbcm5719-llvm-87396b9b08551ff86a788ff41da17b71e4dd4820.tar.gz
bcm5719-llvm-87396b9b08551ff86a788ff41da17b71e4dd4820.zip
Replace ProgramPoint llvm::cast support to be well-defined.
See r175462 for another example/more details. llvm-svn: 175812
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
index 051d60a33f7..312bc749b18 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
@@ -44,7 +44,7 @@ void ArrayBoundChecker::checkLocation(SVal l, bool isLoad, const Stmt* LoadS,
return;
// Get the index of the accessed element.
- DefinedOrUnknownSVal Idx = cast<DefinedOrUnknownSVal>(ER->getIndex());
+ DefinedOrUnknownSVal Idx = ER->getIndex().castAs<DefinedOrUnknownSVal>();
// Zero index is always in bound, this also passes ElementRegions created for
// pointer casts.
OpenPOWER on IntegriCloud