summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer
diff options
context:
space:
mode:
authorGabor Horvath <xazax.hun@gmail.com>2015-10-26 13:32:26 +0000
committerGabor Horvath <xazax.hun@gmail.com>2015-10-26 13:32:26 +0000
commit7910b3358baa69839b32cd45e8b252539c1fedab (patch)
tree26402c51109cf502ea16d9259df903c3e7e4800b /clang/lib/StaticAnalyzer
parent2e919c89ce398541385508f161e1a798a3542273 (diff)
downloadbcm5719-llvm-7910b3358baa69839b32cd45e8b252539c1fedab.tar.gz
bcm5719-llvm-7910b3358baa69839b32cd45e8b252539c1fedab.zip
[analyzer] Fixed a rare crash when analyzing lambda functions.
llvm-svn: 251289
Diffstat (limited to 'clang/lib/StaticAnalyzer')
-rw-r--r--clang/lib/StaticAnalyzer/Core/MemRegion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
index d41fed0619e..86e33969d21 100644
--- a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
+++ b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
@@ -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());
}
OpenPOWER on IntegriCloud