Reimplement fix for <rdar://problem/6451399> problems with labels and blocks.
This solution is much simpler (and doesn't add any per-scope overhead, which concerned Chris). The only downside is the LabelMap is now declared in two places (Sema and BlockSemaInfo). My original fix tried to unify the LabelMap in "Scope" (which would support nested functions in general). In any event, this fixes the bug given the current language definition. If/when we decide to support GCC style nested functions, this will need to be tweaked. llvm-svn: 66896
Showing
- clang/lib/Sema/Sema.h 5 additions, 0 deletionsclang/lib/Sema/Sema.h
- clang/lib/Sema/SemaExpr.cpp 2 additions, 1 deletionclang/lib/Sema/SemaExpr.cpp
- clang/lib/Sema/SemaStmt.cpp 3 additions, 2 deletionsclang/lib/Sema/SemaStmt.cpp
- clang/test/Sema/block-labels.c 17 additions, 0 deletionsclang/test/Sema/block-labels.c
Loading
Please register or sign in to comment