From: Gabor Horvath Date: Mon, 26 Oct 2015 13:32:26 +0000 (+0000) Subject: [analyzer] Fixed a rare crash when analyzing lambda functions. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b012b207b1c104c9bbb1ec1cfc42721d6416e4b;p=clang [analyzer] Fixed a rare crash when analyzing lambda functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251289 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Core/MemRegion.cpp b/lib/StaticAnalyzer/Core/MemRegion.cpp index d41fed0619..86e33969d2 100644 --- a/lib/StaticAnalyzer/Core/MemRegion.cpp +++ b/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()); }