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());
   }


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to