Mike Stump
1eb4433ac4
Remove tabs, and whitespace cleanups.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 15:08:12 +00:00
Mike Stump
d1969d803c
Prep for new warning.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76709 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:43:08 +00:00
Chris Lattner
be6d259a37
enhance the goto checker to reject jumps across __block variable definitions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76376 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 20:17:11 +00:00
Eli Friedman
687abffee4
Don't allow defining a block with a non-prototype type. Remove a
...
hack which introduces some strange inconsistencies in compatibility
for block pointers.
Note that unlike an earlier revision proposed on cfe-commits, this patch
still allows declaring block pointers without a prototype.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-08 04:24:21 +00:00
Mike Stump
7bc8d96440
Allow qualifiers on blocks. Radar 6441502
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-07 21:56:17 +00:00
Mike Stump
af199f32b0
Tighten up relationals with blocks and ints. Radar 6441502
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71171 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-07 18:43:07 +00:00
Mike Stump
dd3e1664b5
Improve semantic checking for blocks. Radar 6441502
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71145 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-07 03:14:14 +00:00
Mike Stump
c975bb04da
Add Sema checking for __block on vm declarations. Radar 6441502
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70601 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-01 23:41:47 +00:00
Mike Stump
ea000bf621
Sema checking for incorrect placement of __block. Radar 6441502
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70452 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-30 00:19:40 +00:00
Mike Stump
914d3db20e
Resolve merge conflict better.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69748 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21 23:03:34 +00:00
Mike Stump
25efa107ae
Tighten up blocks type checking. This was discussed back in the
...
r56595 timeframe, but left undone. Radar 6812711
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21 22:51:42 +00:00
Chris Lattner
5c59e2b521
Fix rdar://6814047, a crash on invalid in blocks code I noticed when
...
working on the previous fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21 22:38:46 +00:00
Chris Lattner
17f3a6d0d8
fix marking of nested blocks with the "hasBlockDeclRefExprs" to
...
mark exactly the blocks which have references that are "live through".
This fixes a rejects valid:
rdar://6808730 - [sema] [blocks] block rejected at global scope
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69738 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21 22:26:47 +00:00
Chris Lattner
ede6e470c0
merge two tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69466 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-18 20:12:56 +00:00
Chris Lattner
bcfce66584
abstract the SwitchStack for blocks just like we do the goto labels.
...
This fixes a crash on invalid (test10). rdar://6805469
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69465 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-18 20:10:59 +00:00
Chris Lattner
5718a351b3
add some block goto test cases.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69460 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-18 19:32:54 +00:00
Mike Stump
aab0f7a749
Fix block comparisons. Radar 6732116.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68171 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 01:17:39 +00:00
Daniel Dunbar
d7d5f0223b
Rename clang to clang-cc.
...
Tests and drivers updated, still need to shuffle dirs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 02:24:46 +00:00
Mike Stump
bfa2ac06d4
Fixup expected errors.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64074 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 07:59:54 +00:00
Chris Lattner
371f258e61
change getCurFunctionDecl to skip through Block contexts to find
...
the containing block. Introduce a new getCurFunctionOrMethodDecl
method to check to see if we're in a function or objc method.
Minor cleanups to other related places. This fixes rdar://6405429.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60564 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-04 23:50:19 +00:00
Chris Lattner
ae0ee03fd9
instead of forcing blocks on by default, make them default to off, but let
...
specific targets default them to on. Default blocks to on on 10.6 and later.
Add a -fblocks option that allows the user to override the target's default.
Use -fblocks in the various testcases that use blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60563 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-04 23:20:07 +00:00
Chris Lattner
ca354faa7e
Implement rdar://6319320: give a good diagnostic for cases where people
...
are trying to use the old GCC "casts as lvalue" extension. We don't and
will hopefully never support this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59460 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-17 19:51:54 +00:00
Chris Lattner
639e2d35d9
Fix rdar://6257721 by tightening up the block "snapshot" check, and
...
move it to its own predicate to make it more clear.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57796 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-20 05:16:36 +00:00
Chris Lattner
f7037b1c3b
Fix rdar://6251437, references to enum constant decls in a block
...
don't need a BlockDeclRefExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56766 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 05:30:26 +00:00
Steve Naroff
dd972f20dc
More type checking for blocks. Still incomplete (will hopefully finish up this weekend).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55862 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-05 22:11:13 +00:00