[cfe-commits] r69686 - /cfe/trunk/lib/Analysis/SVals.cpp
Ted Kremenek
kremenek at apple.com
Tue Apr 21 10:37:26 PDT 2009
Author: kremenek
Date: Tue Apr 21 12:37:26 2009
New Revision: 69686
URL: http://llvm.org/viewvc/llvm-project?rev=69686&view=rev
Log:
Use 'getAs<CodeTextRegion>' instead of 'dyn_cast<CodeTextRegion>' to handle any
layered regions.
Modified:
cfe/trunk/lib/Analysis/SVals.cpp
Modified: cfe/trunk/lib/Analysis/SVals.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/SVals.cpp?rev=69686&r1=69685&r2=69686&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/SVals.cpp (original)
+++ cfe/trunk/lib/Analysis/SVals.cpp Tue Apr 21 12:37:26 2009
@@ -33,7 +33,7 @@
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();
}
More information about the cfe-commits
mailing list