r251289 - [analyzer] Fixed a rare crash when analyzing lambda functions.
Gabor Horvath via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 26 06:32:26 PDT 2015
Author: xazax
Date: Mon Oct 26 08:32:26 2015
New Revision: 251289
URL: http://llvm.org/viewvc/llvm-project?rev=251289&view=rev
Log:
[analyzer] Fixed a rare crash when analyzing lambda functions.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp?rev=251289&r1=251288&r2=251289&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp Mon Oct 26 08:32:26 2015
@@ -1022,7 +1022,7 @@ MemRegionManager::getCXXThisRegion(QualT
// '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());
}
More information about the cfe-commits
mailing list