Commit Graph

28 Commits

Author SHA1 Message Date
Daniel Dunbar 8b57697954 Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

llvm-svn: 86430
2009-11-08 01:45:36 +00:00
Mike Stump 753d120975 Prep for new warning.
llvm-svn: 76709
2009-07-22 00:43:08 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Douglas Gregor ac5d4c5f8e Extend builtin "attribute" syntax to include a notation for
printf-like functions, both builtin functions and those in the
C library. The function-call checker now queries this attribute do
determine if we have a printf-like function, rather than scanning
through the list of "known functions IDs". However, there are 5
functions they are not yet "builtins", so the function-call checker
handles them specifically still:

  - fprintf and vfprintf: the builtins mechanism cannot (yet)
    express FILE* arguments, so these can't be encoded.
  - NSLog: the builtins mechanism cannot (yet) express NSString*
    arguments, so this (and NSLogv) can't be encoded.
  - asprintf and vasprintf: these aren't part of the C99 standard
    library, so we really shouldn't be defining them as builtins in
    the general case (and we don't seem to have the machinery to make
    them builtins only on certain targets and depending on whether
    extensions are enabled).

llvm-svn: 64512
2009-02-14 00:32:47 +00:00
Steve Naroff 6ab6dc75ef Fix <rdar://problem/6465284> clang ObjC rewriter: objc_super messed up again.
llvm-svn: 61384
2008-12-23 20:11:22 +00:00
Steve Naroff 08628db9d2 Fix <rdar://problem/6429113> clang ObjC rewriter: crash rewriting file with Blocks and properties
More fancy footwork to cope with rewriting property 'setters'.

llvm-svn: 60760
2008-12-09 12:56:34 +00:00
Steve Naroff 1042ff345a Handle chained/nested property 'getters' (obj.p1.p2.p3).
This is a follow-up to fixing <rdar://problem/6213955> clang ObjC rewriter: rewriter doesn't appear to support @property and @synthesize.

llvm-svn: 60700
2008-12-08 16:43:47 +00:00
Steve Naroff 6d6da255fb Fixed <rdar://problem/6213808> clang ObjC rewriter: @finally is not always executed
llvm-svn: 60593
2008-12-05 17:03:39 +00:00
Chris Lattner 2ca529ce61 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.

llvm-svn: 60563
2008-12-04 23:20:07 +00:00
Steve Naroff dbfc693f47 Fix <rdar://problem/6291588> assertion failure: SourceManager.h line 489.
llvm-svn: 59664
2008-11-19 21:15:47 +00:00
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