From b3090384227bf61f889b6aaf4230eccaacc85514 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 5 Feb 2017 19:37:40 +0000 Subject: Vendor import of clang release_40 branch r294123: https://llvm.org/svn/llvm-project/cfe/branches/release_40@294123 --- lib/StaticAnalyzer/Core/MemRegion.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/StaticAnalyzer/Core/MemRegion.cpp') diff --git a/lib/StaticAnalyzer/Core/MemRegion.cpp b/lib/StaticAnalyzer/Core/MemRegion.cpp index c4ba2ae199f8..d6e8fe5b51b3 100644 --- a/lib/StaticAnalyzer/Core/MemRegion.cpp +++ b/lib/StaticAnalyzer/Core/MemRegion.cpp @@ -816,9 +816,11 @@ const VarRegion* MemRegionManager::getVarRegion(const VarDecl *D, const StackFrameContext *STC = V.get(); - if (!STC) + if (!STC) { + // FIXME: Assign a more sensible memory space to static locals + // we see from within blocks that we analyze as top-level declarations. sReg = getUnknownRegion(); - else { + } else { if (D->hasLocalStorage()) { sReg = isa(D) || isa(D) ? static_cast(getStackArgumentsRegion(STC)) -- cgit v1.2.3