summaryrefslogtreecommitdiffstats
path: root/clang/Driver/RewriteTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* add some helper methods for removing and replacing text, this makes theChris Lattner2008-01-311-45/+56
| | | | | | rewriter more robust. llvm-svn: 46622
* Add a new InsertText method that does the check to see if the insertion was ↵Chris Lattner2008-01-311-34/+40
| | | | | | | | | valid. This fixes crashes where the insertion point was in a macro. Instead of crashing, we want to emit a warning. llvm-svn: 46621
* move a large method out of lineChris Lattner2008-01-311-82/+86
| | | | llvm-svn: 46620
* Make rewriter::inserttext return a bool to indicate if it failed.Chris Lattner2008-01-311-51/+23
| | | | | | | Add a RewriteTest::ReplaceStmt method to factor the 'checking for rewrite failed + emitting diagnostic if so' code. llvm-svn: 46619
* Fix a rewriter crash when the whole body of a foreach is itself Chris Lattner2008-01-311-8/+9
| | | | | | | rewritten, as in Sema/rewrite-foreach-6.m. Fariborz/Steve, please review this to see if it is sane. llvm-svn: 46600
* Abolish a bunch of Xcode inserted tabs.Steve Naroff2008-01-301-29/+29
| | | | llvm-svn: 46566
* Rewriting of @synchronized. This has one FIXME in it. But this should allow ↵Fariborz Jahanian2008-01-291-1/+53
| | | | | | @sychronized to be rewritten. llvm-svn: 46533
* Add -Wno-rewrite-macros to silence the following warning when using ↵Steve Naroff2008-01-281-23/+34
| | | | | | | | -rewrite-test: xx.m:10:3: warning: rewriting sub-expression within a macro (may not be correct) llvm-svn: 46462
* Fixed a nasty bug which took a while to come up with a test case, Fariborz Jahanian2008-01-231-0/+5
| | | | | | | | diagnose, and took even longer to fix. It has to do with rewriting of a message receiver which is an 'ivar' reference. Fix, however, is to remove a code which was not doing the right thing and no longer needed. llvm-svn: 46279
* Problem with ObjC's type-encoding of nested structs causing infinit recursion.Fariborz Jahanian2008-01-221-3/+7
| | | | llvm-svn: 46260
* Synthesize methods with va-arg list correctly.Fariborz Jahanian2008-01-211-0/+2
| | | | llvm-svn: 46212
* Fixed comment.Fariborz Jahanian2008-01-191-1/+1
| | | | llvm-svn: 46185
* Fix two bugs with an @throw that doesn't have a statement.Steve Naroff2008-01-191-1/+4
| | | | | | | - ObjCAtThrowStmt::getSourceRange() needs to check if it has a statement (and not go "boom":-) - RewriteTest::RewriteObjCThrowStmt() needs to generate refer to the current exception. llvm-svn: 46184
* Patch to replace #import with #include.Fariborz Jahanian2008-01-191-27/+28
| | | | llvm-svn: 46183
* Insert #pragma once when rewriting a header file.Fariborz Jahanian2008-01-181-7/+34
| | | | llvm-svn: 46155
* Typo.Fariborz Jahanian2008-01-161-1/+1
| | | | llvm-svn: 46038
* Added support for rewriting of continue/break statements inside ObjC2's ↵Fariborz Jahanian2008-01-151-6/+86
| | | | | | foreach-stmt. llvm-svn: 46037
* Record if a compound literal expression is @ file scope. This allows us to ↵Steve Naroff2008-01-141-3/+3
| | | | | | | | implement C99 6.5.2.5p6. This could have been done without modifying the AST (by checking the decl type and passing the info down to isContextExpr), however we concluded this is more desirable. Bug/patch by Eli Friedman! llvm-svn: 45966
* Avoid redefinition of __objcFastEnumerationStateFariborz Jahanian2008-01-101-1/+4
| | | | llvm-svn: 45842
* Put return type of synthesize method on same line as method declaration, ↵Fariborz Jahanian2008-01-101-2/+2
| | | | | | space after method declaration header. llvm-svn: 45806
* Allow messaging expression as foreach's collection expression.Fariborz Jahanian2008-01-101-6/+16
| | | | llvm-svn: 45793
* Type-cast RHS of assignment to prevent warning compiling rewritten foreach code.Fariborz Jahanian2008-01-091-5/+11
| | | | llvm-svn: 45777
* Fixed a bug whereby a parethesized collection expression was not being ↵Fariborz Jahanian2008-01-091-1/+1
| | | | | | rewritten correctly. llvm-svn: 45776
* Typo fixed.Fariborz Jahanian2008-01-091-1/+1
| | | | llvm-svn: 45771
* Patch to rewrite ObjC2's foreach-stmt.Fariborz Jahanian2008-01-081-24/+150
| | | | llvm-svn: 45760
* Patch to start rewriting of ObjC2's foreach statement (work in progress).Fariborz Jahanian2008-01-071-0/+39
| | | | llvm-svn: 45721
* Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek2008-01-071-188/+188
| | | | | | | some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. llvm-svn: 45715
* Compute the proper sourcerange for an CompoundLiteralExpr.Chris Lattner2008-01-021-2/+4
| | | | llvm-svn: 45504
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | discussion of this change. llvm-svn: 45410
* remove use of alloca.Chris Lattner2007-12-231-8/+9
| | | | llvm-svn: 45329
* Unbreak mingw buildAnton Korobeynikov2007-12-231-0/+1
| | | | llvm-svn: 45328
* Interned MainFileID within SourceManager. Since SourceManager is referenced byTed Kremenek2007-12-191-3/+3
| | | | | | | | | both Preprocessor and ASTContext, we no longer need to explicitly pass MainFileID around in function calls that also pass either Preprocessor or ASTContext. This resulted in some nice cleanups in the ASTConsumers and the driver. llvm-svn: 45228
* Soften the macro rewrite error to a warning (and change the text).Steve Naroff2007-12-191-32/+16
| | | | llvm-svn: 45209
* Emit errors when attempting to rewrite ObjC expressions that originate from ↵Steve Naroff2007-12-191-7/+63
| | | | | | | | a macro expansion. We plan on fixing this and removing this restriction after the break... llvm-svn: 45200
* Refactoring work. ObjcQualifiedIdType is now derived from 'Type'.Fariborz Jahanian2007-12-181-7/+16
| | | | llvm-svn: 45174
* Patch to implemented objective-c's dynamic object pointer qualified withFariborz Jahanian2007-12-171-6/+23
| | | | | | the protocol list (id<P,...> types). llvm-svn: 45121
* Also fixed similar regression for class methods, as well as more indentations.Fariborz Jahanian2007-12-171-4/+7
| | | | llvm-svn: 45107
* Fixed a regression caused by refactoring of some meta-data generation ↵Fariborz Jahanian2007-12-171-15/+18
| | | | | | | | routines using iteratgors. Also fixed indentation problems. llvm-svn: 45105
* - Remove getInstanceMethods/getClassMethods API on ObjcInterfaceDecl, ↵Steve Naroff2007-12-141-54/+52
| | | | | | | | | | ObjcProtocolDecl, and ObjcCategoryDecl. These methods are replaced by the respective iterators on each class. - Add getInstanceMethodForSelector to ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCatgoryDecl. This hook will do a "shallow" lookup. This is a convenience method that reducing some of the iterator usage. - Various changes to convert all clients to the above API's... llvm-svn: 45046
* TargetInfo no longer includes a reference to SourceManager.Ted Kremenek2007-12-121-2/+1
| | | | | | | | | | | | | | | Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation. Added many utility methods to FullSourceLoc to provide shorthand for: FullLoc.getManager().someMethod(FullLoc.getLocation()); instead we have: FullLoc.someMethod(); Modified TextDiagnostics (and related classes) to use this short-hand. llvm-svn: 44957
* more cleanups changing things like getInstanceVariables to iterators.Chris Lattner2007-12-121-15/+20
| | | | llvm-svn: 44930
* resolve some fixmes and clean up some code by eliminating the get*Vars apis ↵Chris Lattner2007-12-121-66/+51
| | | | | | to some classes and use iterators instead. llvm-svn: 44927
* 80-column please.Fariborz Jahanian2007-12-111-2/+5
| | | | llvm-svn: 44888
* Implemented rewriting of protocol-qualified global variable types.Fariborz Jahanian2007-12-111-19/+48
| | | | | | | Re-implemented some of rewriting of protocol-qualified function argument types to support it in its generality. llvm-svn: 44886
* Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. NowTed Kremenek2007-12-111-3/+4
| | | | | | | | | | | | | | | | | | SourceManager is passed by reference, allowing the SourceManager to be associated with a specific translation unit, and not the entire execution of the driver. Modified all users of Diagnostics to comply with this new interface. Integrated SourceManager as a member variable of TargetInfo. TargetInfo will eventually be associated with a single translation unit (just like SourceManager). Made the SourceManager reference in ASTContext private. Provided accessor getSourceManager() for clients to use instead. Modified clients to comply with new interface. llvm-svn: 44878
* Refactor Rewritetest::RewriteObjcQualifiedInterfaceTypes in preparation for moreFariborz Jahanian2007-12-111-10/+13
| | | | | | general use. llvm-svn: 44876
* Omit the field name when including the super class structure template.Steve Naroff2007-12-071-4/+10
| | | | | | | | This allows us to access a superclasses ivars without deriving the absolute path. The comments below say a bit more... llvm-svn: 44688
* Implemented when static typing is combined with protocols and use as receiverFariborz Jahanian2007-12-071-0/+4
| | | | | | type. llvm-svn: 44685
* Patch for rewriting of @protocol.Fariborz Jahanian2007-12-071-4/+52
| | | | llvm-svn: 44681
* Rewrite 'super' within a class method. This required some minor tweaks to ↵Steve Naroff2007-12-071-14/+79
| | | | | | the front-end. llvm-svn: 44673
OpenPOWER on IntegriCloud