aboutsummaryrefslogtreecommitdiff
path: root/Driver/RewriteTest.cpp
AgeCommit message (Collapse)Author
2008-01-31Add a new InsertText method that does the check to see if the insertion was ↵Chris Lattner
valid. This fixes crashes where the insertion point was in a macro. Instead of crashing, we want to emit a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46621 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31move a large method out of lineChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46620 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Make rewriter::inserttext return a bool to indicate if it failed.Chris Lattner
Add a RewriteTest::ReplaceStmt method to factor the 'checking for rewrite failed + emitting diagnostic if so' code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46619 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Fix a rewriter crash when the whole body of a foreach is itself Chris Lattner
rewritten, as in Sema/rewrite-foreach-6.m. Fariborz/Steve, please review this to see if it is sane. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46600 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Abolish a bunch of Xcode inserted tabs.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46566 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29Rewriting of @synchronized. This has one FIXME in it. But this should allow ↵Fariborz Jahanian
@sychronized to be rewritten. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46533 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28Add -Wno-rewrite-macros to silence the following warning when using ↵Steve Naroff
-rewrite-test: xx.m:10:3: warning: rewriting sub-expression within a macro (may not be correct) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46462 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-23Fixed a nasty bug which took a while to come up with a test case, Fariborz Jahanian
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46279 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-22Problem with ObjC's type-encoding of nested structs causing infinit recursion.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46260 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-21Synthesize methods with va-arg list correctly.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46212 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-19Fixed comment.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46185 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-19Fix two bugs with an @throw that doesn't have a statement.Steve Naroff
- ObjCAtThrowStmt::getSourceRange() needs to check if it has a statement (and not go "boom":-) - RewriteTest::RewriteObjCThrowStmt() needs to generate refer to the current exception. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46184 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-19Patch to replace #import with #include.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46183 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-18Insert #pragma once when rewriting a header file.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46155 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-16Typo.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46038 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15Added support for rewriting of continue/break statements inside ObjC2's ↵Fariborz Jahanian
foreach-stmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46037 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14Record if a compound literal expression is @ file scope. This allows us to ↵Steve Naroff
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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45966 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10Avoid redefinition of __objcFastEnumerationStateFariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45842 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10Put return type of synthesize method on same line as method declaration, ↵Fariborz Jahanian
space after method declaration header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45806 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10Allow messaging expression as foreach's collection expression.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45793 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09Type-cast RHS of assignment to prevent warning compiling rewritten foreach code.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45777 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09Fixed a bug whereby a parethesized collection expression was not being ↵Fariborz Jahanian
rewritten correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45776 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09Typo fixed.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45771 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-08Patch to rewrite ObjC2's foreach-stmt.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45760 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Patch to start rewriting of ObjC2's foreach statement (work in progress).Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45721 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek
some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45715 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02Compute the proper sourcerange for an CompoundLiteralExpr.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Don't attribute in file headers anymore. See llvmdev for theChris Lattner
discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23remove use of alloca.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45329 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23Unbreak mingw buildAnton Korobeynikov
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45328 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Interned MainFileID within SourceManager. Since SourceManager is referenced byTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45228 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Soften the macro rewrite error to a warning (and change the text).Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45209 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Emit errors when attempting to rewrite ObjC expressions that originate from ↵Steve Naroff
a macro expansion. We plan on fixing this and removing this restriction after the break... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45200 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Refactoring work. ObjcQualifiedIdType is now derived from 'Type'.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45174 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Patch to implemented objective-c's dynamic object pointer qualified withFariborz Jahanian
the protocol list (id<P,...> types). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45121 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Also fixed similar regression for class methods, as well as more indentations.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45107 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Fixed a regression caused by refactoring of some meta-data generation ↵Fariborz Jahanian
routines using iteratgors. Also fixed indentation problems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45105 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-14- Remove getInstanceMethods/getClassMethods API on ObjcInterfaceDecl, ↵Steve Naroff
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... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45046 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12TargetInfo no longer includes a reference to SourceManager.Ted Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44957 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12more cleanups changing things like getInstanceVariables to iterators.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44930 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12resolve some fixmes and clean up some code by eliminating the get*Vars apis ↵Chris Lattner
to some classes and use iterators instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44927 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-1180-column please.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44888 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Implemented rewriting of protocol-qualified global variable types.Fariborz Jahanian
Re-implemented some of rewriting of protocol-qualified function argument types to support it in its generality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44886 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. NowTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44878 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Refactor Rewritetest::RewriteObjcQualifiedInterfaceTypes in preparation for moreFariborz Jahanian
general use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44876 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-07Omit the field name when including the super class structure template.Steve Naroff
This allows us to access a superclasses ivars without deriving the absolute path. The comments below say a bit more... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44688 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-07Implemented when static typing is combined with protocols and use as receiverFariborz Jahanian
type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44685 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-07Patch for rewriting of @protocol.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44681 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-07Rewrite 'super' within a class method. This required some minor tweaks to ↵Steve Naroff
the front-end. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44673 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06On Steve's suggestion, moved handling of use of undeclared method in a messageFariborz Jahanian
to rewriter (my previous patch). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44665 91177308-0d34-0410-b5e6-96231b3b80d8