aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-04-21 17:37:26 +0000
committerTed Kremenek <kremenek@apple.com>2009-04-21 17:37:26 +0000
commit4abbea67fdf0fb1b7b09ee2dfa4359aa29c12517 (patch)
tree881ec9b32bafb954909acb8050219b32bd7e20e6
parentbf94ca68bdaf4d56f89a97bd84bb8f25af8982d5 (diff)
Use 'getAs<CodeTextRegion>' instead of 'dyn_cast<CodeTextRegion>' to handle any
layered regions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69686 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/SVals.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/SVals.cpp b/lib/Analysis/SVals.cpp
index 8eaeda4b7d..71f09d2dfc 100644
--- a/lib/Analysis/SVals.cpp
+++ b/lib/Analysis/SVals.cpp
@@ -33,7 +33,7 @@ using llvm::APSInt;
const FunctionDecl* SVal::getAsFunctionDecl() const {
if (const loc::MemRegionVal* X = dyn_cast<loc::MemRegionVal>(this)) {
const MemRegion* R = X->getRegion();
- if (const CodeTextRegion* CTR = dyn_cast<CodeTextRegion>(R)) {
+ if (const CodeTextRegion* CTR = R->getAs<CodeTextRegion>()) {
if (CTR->isDeclared())
return CTR->getDecl();
}