aboutsummaryrefslogtreecommitdiff
path: root/test/Rewriter
AgeCommit message (Collapse)Author
2009-07-22Prep for new warning.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76709 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24Rename clang to clang-cc.Daniel Dunbar
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-02-14Extend builtin "attribute" syntax to include a notation forDouglas Gregor
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64512 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-23Fix <rdar://problem/6465284> clang ObjC rewriter: objc_super messed up again.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61384 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09Fix <rdar://problem/6429113> clang ObjC rewriter: crash rewriting file with ↵Steve Naroff
Blocks and properties More fancy footwork to cope with rewriting property 'setters'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60760 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08Handle chained/nested property 'getters' (obj.p1.p2.p3).Steve Naroff
This is a follow-up to fixing <rdar://problem/6213955> clang ObjC rewriter: rewriter doesn't appear to support @property and @synthesize. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60700 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-05Fixed <rdar://problem/6213808> clang ObjC rewriter: @finally is not always ↵Steve Naroff
executed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60593 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-04instead of forcing blocks on by default, make them default to off, but letChris Lattner
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-11-19Fix <rdar://problem/6291588> assertion failure: SourceManager.h line 489.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59664 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15Tighten up blocks rewriter to handle casts and some other interesting cases.Steve Naroff
This fixes <rdar://problem/6289007> clang block rewriter: ^ in cast is not rewritten. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57591 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-23Teach block rewriter to replace '^' with '*' in VarDecls.Steve Naroff
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:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56499 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19Fix crasher in RewriteObjC::RewriteObjCSynchronizedStmt(). Can't depend on ↵Steve Naroff
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54986 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21Fix a test RUN line to not generate '=-' in test directoryDaniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53865 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16RewriteObjC::RewriteObjCTryStmt():Don't synthesize a catch begin if there ↵Steve Naroff
are 0 catch clauses. This fixes <rdar://problem/5987211> clang ObjC rewriter: @try / @finally block produces unbalanced output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53679 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-21Switch 'super' from being a weird cast thing to being a predefined expr node.Chris Lattner
Patch by David Chisnall with objc rewriter and stmtdumper updates from me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52580 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-12Multiple tests in a single test file must be linked with '&&'.Argyrios Kyrtzidis
Otherwise, failing tests other than the last one will not be reported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52231 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-07Don't include objc.h, so the rewriter tests work on machines without it.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52082 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-23fix a nasty off-by-one error.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51519 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-23fix an inconsistency computing offsets that caused a crash on rewrite-nest.mChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51514 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14Rename RewriteTest->RewriteObjC.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49692 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28Only have the rewriter produce a file when there are no errors.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48926 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26Fix rewriter tests to work with new output file logic. This changes forces ↵Steve Naroff
the output to standard out (rather than generate a .cpp file, which is the new default for the rewriter). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48847 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-22Teach the rewriter how to respect the -o option.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48669 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12Two fixes to RewriteTest::RewriteObjCIvarRefExpr():Steve Naroff
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48309 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12Since the rewriter now outputs C++, it no longer makes sense to pipe the ↵Steve Naroff
output to clang. This should "fix" all but one of the test failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48275 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01Fix two rewriter bugs with @catch.Steve Naroff
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46644 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01Moved "Rewriter" tests from test/Sema to test/Rewriter.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46640 91177308-0d34-0410-b5e6-96231b3b80d8