summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
diff options
context:
space:
mode:
authorGabor Horvath <xazax.hun@gmail.com>2015-10-27 12:36:26 +0000
committerGabor Horvath <xazax.hun@gmail.com>2015-10-27 12:36:26 +0000
commit244d27149a2a89ef50c45c37cd907c73bf9b30df (patch)
tree9767fd396d7b5421232ac56a1fa5fca8e97a6946 /clang/lib/StaticAnalyzer/Core/MemRegion.cpp
parent458d3d6a5e0a3a6bf5d3cfca4ad2be96f624859a (diff)
downloadbcm5719-llvm-244d27149a2a89ef50c45c37cd907c73bf9b30df.tar.gz
bcm5719-llvm-244d27149a2a89ef50c45c37cd907c73bf9b30df.zip
[analyzer] Fix another crash when analyzing lambda functions.
llvm-svn: 251404
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/MemRegion.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/MemRegion.cpp3
1 files changed, 2 insertions, 1 deletions
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<PointerType>())) {
+ (!D || D->isStatic() ||
+ PT != D->getThisType(getContext())->getAs<PointerType>())) {
LC = LC->getParent();
D = dyn_cast<CXXMethodDecl>(LC->getDecl());
}
OpenPOWER on IntegriCloud