From 7910b3358baa69839b32cd45e8b252539c1fedab Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Mon, 26 Oct 2015 13:32:26 +0000 Subject: [analyzer] Fixed a rare crash when analyzing lambda functions. llvm-svn: 251289 --- clang/lib/StaticAnalyzer/Core/MemRegion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/StaticAnalyzer/Core/MemRegion.cpp') 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()) { + (!D || PT != D->getThisType(getContext())->getAs())) { LC = LC->getParent(); D = dyn_cast(LC->getDecl()); } -- cgit v1.2.3