Use 'getAs<CodeTextRegion>' instead of 'dyn_cast<CodeTextRegion>' to handle any
layered regions. llvm-svn: 69686
This commit is contained in:
parent
55f84db7ea
commit
30fb341f4f
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue