From 244d27149a2a89ef50c45c37cd907c73bf9b30df Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Tue, 27 Oct 2015 12:36:26 +0000 Subject: [analyzer] Fix another crash when analyzing lambda functions. llvm-svn: 251404 --- clang/lib/StaticAnalyzer/Core/MemRegion.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib') diff --git a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp index 86e33969d21..632a381a398 100644 --- a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp +++ b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp @@ -1022,7 +1022,8 @@ MemRegionManager::getCXXThisRegion(QualType thisPointerTy, // 'this' refers to a this to the enclosing scope, there is no right region to // return. while (!LC->inTopFrame() && - (!D || PT != D->getThisType(getContext())->getAs())) { + (!D || D->isStatic() || + PT != D->getThisType(getContext())->getAs())) { LC = LC->getParent(); D = dyn_cast(LC->getDecl()); } -- cgit v1.2.3