summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix/Unix.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-01 23:15:13 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-01 23:15:13 +0000
commit9a28e84b325851310ca2cdfa59d8d8f2875d5a2e (patch)
tree0e7941cd59e926d8b6f66030016fecab0896c1df /llvm/lib/System/Unix/Unix.h
parent3144e663778be58a6e378e642cef0136dface777 (diff)
downloadbcm5719-llvm-9a28e84b325851310ca2cdfa59d8d8f2875d5a2e.tar.gz
bcm5719-llvm-9a28e84b325851310ca2cdfa59d8d8f2875d5a2e.zip
Keep an explicit stack of function and block scopes, each element of
which has the label map, switch statement stack, etc. Previously, we had a single set of maps in Sema (for the function) along with a stack of block scopes. However, this lead to funky behavior with nested functions, e.g., in the member functions of local classes. The explicit-stack approach is far cleaner, and we retain a 1-element cache so that we're not malloc/free'ing every time we enter a function. Fixes PR6382. Also, tweaked the unused-variable warning suppression logic to look at errors within a given Scope rather than within a given function. The prior code wasn't looking at the right number-of-errors count when dealing with blocks, since the block's count would be deallocated before we got to ActOnPopScope. This approach works with nested blocks/functions, and gives tighter error recovery. llvm-svn: 97518
Diffstat (limited to 'llvm/lib/System/Unix/Unix.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud