Skip to content

Commit

Permalink
[analyzer] Fixed a rare crash when analyzing lambda functions.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251289 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Xazax-hun committed Oct 26, 2015
1 parent afbad5d commit 7b012b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/StaticAnalyzer/Core/MemRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ MemRegionManager::getCXXThisRegion(QualType thisPointerTy,
// 'this' refers to a this to the enclosing scope, there is no right region to
// return.
while (!LC->inTopFrame() &&
PT != D->getThisType(getContext())->getAs<PointerType>()) {
(!D || PT != D->getThisType(getContext())->getAs<PointerType>())) {
LC = LC->getParent();
D = dyn_cast<CXXMethodDecl>(LC->getDecl());
}
Expand Down

0 comments on commit 7b012b2

Please sign in to comment.