]> granicus.if.org Git - clang/commit
Merging r292800:
authorHans Wennborg <hans@hanshq.net>
Tue, 24 Jan 2017 00:08:26 +0000 (00:08 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 24 Jan 2017 00:08:26 +0000 (00:08 +0000)
commit723411114176b97fe8cc93358cd094218efa5d24
tree1caf6106ed84e6d2d8d168abb02188abd2afd403
parent12c394c7d933abb7e76c60977d611052f11bf600
Merging r292800:
------------------------------------------------------------------------
r292800 | dergachev | 2017-01-23 08:57:11 -0800 (Mon, 23 Jan 2017) | 13 lines

[analyzer] Fix memory space of static locals seen from nested blocks.

When a block within a function accesses a function's static local variable,
this local is captured by reference rather than copied to the heap.

Therefore this variable's memory space is known: StaticGlobalSpaceRegion.
Used to be UnknownSpaceRegion, same as for stack locals.

Fixes a false positive in MacOSXAPIChecker.

rdar://problem/30105546
Differential revision: https://reviews.llvm.org/D28946

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292858 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/MemRegion.cpp
test/Analysis/dispatch-once.m