Steve Naroff
e17f52fc23
Tighten up blocks rewriter to handle casts and some other interesting cases.
...
This fixes <rdar://problem/6289007> clang block rewriter: ^ in cast is not rewritten.
llvm-svn: 57591
2008-10-15 18:38:58 +00:00
Steve Naroff
87930ca38f
Teach block rewriter to replace '^' with '*' in VarDecls.
...
Since we don't have DeclGroup's and location information for types, there is some fancy footwork to do this fairly reliably.
O.K...it's a kludge. One day, we can use this as motivation to do this more gracefully:-)
llvm-svn: 56499
2008-09-23 19:24:41 +00:00
Steve Naroff
ad7013b1e6
Fix crasher in RewriteObjC::RewriteObjCSynchronizedStmt(). Can't depend on the source locations of the sync expression (since it may have been rewritten.
...
Fixes <rdar://problem/6156363> clang ObjC rewriter: rewriting attached file causes assertion failure: invalid FileID
llvm-svn: 54986
2008-08-19 13:04:19 +00:00
Daniel Dunbar
5b288788b3
Fix a test RUN line to not generate '=-' in test directory
...
llvm-svn: 53865
2008-07-21 18:42:27 +00:00
Steve Naroff
ce2dca186b
RewriteObjC::RewriteObjCTryStmt():Don't synthesize a catch begin if there are 0 catch clauses.
...
This fixes <rdar://problem/5987211> clang ObjC rewriter: @try / @finally block produces unbalanced output.
llvm-svn: 53679
2008-07-16 15:31:30 +00:00
Chris Lattner
a9b3cae8fd
Switch 'super' from being a weird cast thing to being a predefined expr node.
...
Patch by David Chisnall with objc rewriter and stmtdumper updates from me.
llvm-svn: 52580
2008-06-21 18:04:54 +00:00
Argyrios Kyrtzidis
351763e156
Multiple tests in a single test file must be linked with '&&'.
...
Otherwise, failing tests other than the last one will not be reported.
llvm-svn: 52231
2008-06-12 12:40:02 +00:00
Eli Friedman
7e4f41ef3f
Don't include objc.h, so the rewriter tests work on machines without it.
...
llvm-svn: 52082
2008-06-07 23:15:03 +00:00
Chris Lattner
10a7bd6341
fix a nasty off-by-one error.
...
llvm-svn: 51519
2008-05-23 23:29:33 +00:00
Chris Lattner
17c2476d0b
fix an inconsistency computing offsets that caused a crash on rewrite-nest.m
...
llvm-svn: 51514
2008-05-23 23:06:56 +00:00
Steve Naroff
1dc53ef494
Rename RewriteTest->RewriteObjC.
...
llvm-svn: 49692
2008-04-14 22:03:09 +00:00
Steve Naroff
f9e7c90129
Only have the rewriter produce a file when there are no errors.
...
llvm-svn: 48926
2008-03-28 22:26:09 +00:00
Steve Naroff
c10c2e339f
Fix rewriter tests to work with new output file logic. This changes forces the output to standard out (rather than generate a .cpp file, which is the new default for the rewriter).
...
llvm-svn: 48847
2008-03-26 22:28:40 +00:00
Chris Lattner
97d496c182
Teach the rewriter how to respect the -o option.
...
llvm-svn: 48669
2008-03-22 00:08:40 +00:00
Steve Naroff
35cb7960e3
Two fixes to RewriteTest::RewriteObjCIvarRefExpr():
...
- For explicit ivar refers, make sure the cast is propagated to the AST.
- Don't free the base (since it is still in use).
This fixes the recent regression to test/Rewriter/objc-ivar-receiver-1.m.
llvm-svn: 48309
2008-03-12 23:15:19 +00:00
Steve Naroff
4182fd56ad
Since the rewriter now outputs C++, it no longer makes sense to pipe the output to clang.
...
This should "fix" all but one of the test failure.
llvm-svn: 48275
2008-03-12 02:07:40 +00:00
Steve Naroff
edb5bc6f09
Fix two rewriter bugs with @catch .
...
- Support @catch(...), rather than crash:-)
- Make sure all catch bodies get rewritten. This "fix" is really a workaround until the iterator for the "try" AST is fixed. Will fix this in a separate commit.
llvm-svn: 46644
2008-02-01 20:02:07 +00:00
Ted Kremenek
e9a709a0c5
Moved "Rewriter" tests from test/Sema to test/Rewriter.
...
llvm-svn: 46640
2008-02-01 17:05:54 +00:00