summaryrefslogtreecommitdiffstats
path: root/clang/Driver/RewriteObjC.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Unbreak SerializationTest and the Rewriter by doing the work in ↵Ted Kremenek2008-08-081-2/+5
| | | | | | HandleTranslationUnit instead of the destructor. llvm-svn: 54513
* Fix for <rdar://problem/6113807> clang ObjC rewriter: crash rewriting ↵Steve Naroff2008-08-061-1/+3
| | | | | | | | attached file While this is a safe rewriter fix, there is still a need for some discussion (see report for more info). llvm-svn: 54412
* Finish fixing <rdar://problem/5929344> clang ObjC rewriter: "extern int ↵Steve Naroff2008-08-051-0/+4
| | | | | | __CFConstantStringClassReference[];" should be extern "C" llvm-svn: 54367
* Fix <rdar://problem/6108119> clang ObjC rewriter: if no newline at end of ↵Steve Naroff2008-08-051-1/+1
| | | | | | input file, rewriter inserts #define on same line as closing brace llvm-svn: 54363
* Fix incomplete implementation for rewriting protocol refs.Steve Naroff2008-07-291-0/+25
| | | | | | <rdar://problem/6108127> clang ObjC rewriter: no translation of id <proto> llvm-svn: 54163
* remove some unneeded calls to getCanonicalTypeChris Lattner2008-07-261-3/+2
| | | | llvm-svn: 54106
* Fix RewriteObjC::RewriteObjCThrowStmt() to respect whitespace between the @ ↵Steve Naroff2008-07-251-1/+6
| | | | | | | | and throw. This fixes <rdar://problem/5988388> clang ObjC rewriter: mystery 'w' inserted in exception throw. llvm-svn: 54017
* Fix Sema::ActOnClassMessage() to pass through the identifier for "super". Steve Naroff2008-07-241-0/+2
| | | | | | | | This fixes a critical rewriter bug (<rdar://problem/6096760> clang ObjC rewriter: 'self' not expected value in class method called with 'super'). Also added a couple FIXME's since I'm not happy with my fix to Sema. It would be nicer if the super handling for class/instance messages was the same (based on PreDefinedExpr). llvm-svn: 53994
* unindent this function by using an early exit, not functionality change.Chris Lattner2008-07-211-160/+160
| | | | llvm-svn: 53877
* move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>,Chris Lattner2008-07-211-20/+16
| | | | | | simplifying code along the way and fixing a problem and memory leak or two. llvm-svn: 53876
* RewriteObjC::RewriteObjCForCollectionStmt() needs to handle bodies with a ↵Steve Naroff2008-07-211-2/+18
| | | | | | | | single statement. Fixes <rdar://problem/6084870> clang ObjC rewriter: for-in enumeration in 1 line produces output with error. llvm-svn: 53858
* introduce a new ObjCList templated class and start moving Chris Lattner2008-07-211-7/+7
| | | | | | | various objc lists over to it. First up, the protocol list on ObjCInterfaceDecl. llvm-svn: 53856
* RewriteObjC::SynthMessageExpr(): Fix super rewrite (a fairly recent regression).Steve Naroff2008-07-161-1/+4
| | | | | | Fixes <rdar://problem/6046663> clang ObjC rewriter: Regression in handling of 'super' in latest build. llvm-svn: 53703
* Remove a FIXME from RewriteObjC::RewriteObjCSynchronizedStmt().Steve Naroff2008-07-161-2/+5
| | | | llvm-svn: 53696
* RewriteObjC::Initialize(): add function decls used by @synchronized.Steve Naroff2008-07-161-0/+3
| | | | | | This fixes <rdar://problem/6040143> clang ObjC rewriter: @synchronized keyword inserts undeclared objc functions. llvm-svn: 53695
* Two fixes:Steve Naroff2008-07-161-7/+13
| | | | | | | - Make sure ObjCIvarDecl propagates the bitfield width. - RewriteObjC::SynthesizeIvarOffsetComputation(): Avoid using the __OFFSETOF__ mumbo jumbo for bitfields (since it isn't legal C). This fixes <rdar://problem/5986079> clang ObjC rewriter: bitfields and ivar access don't mix. llvm-svn: 53694
* RewriteObjC::RewriteObjCTryStmt():Don't synthesize a catch begin if there ↵Steve Naroff2008-07-161-13/+13
| | | | | | | | are 0 catch clauses. This fixes <rdar://problem/5987211> clang ObjC rewriter: @try / @finally block produces unbalanced output. llvm-svn: 53679
* Teach RewriteObjC::RewriteObjCMethodDecl() to deal with pointer to function ↵Steve Naroff2008-07-161-1/+33
| | | | | | | | return types. This fixes <rdar://problem/6034961> clang ObjC rewriter: rewriting methods with function pointer return values does not work llvm-svn: 53678
* Switch 'super' from being a weird cast thing to being a predefined expr node.Chris Lattner2008-06-211-25/+8
| | | | | | Patch by David Chisnall with objc rewriter and stmtdumper updates from me. llvm-svn: 52580
* Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.Chris Lattner2008-06-171-3/+4
| | | | | | Patch by David Chisnall! llvm-svn: 52422
* -Changes to TagDecl:Argyrios Kyrtzidis2008-06-091-6/+8
| | | | | | | | | Added TagKind enum. Added getTagKind() method. Added convenience methods: isEnum(), isStruct(), isUnion(), isClass(). -RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one. llvm-svn: 52160
* Fix <rdar://problem/5976164> clang ObjC rewriter: for ... in enumeration ↵Steve Naroff2008-06-021-0/+1
| | | | | | inserts undeclared function (objc_enumerationMutation should be in preamble) llvm-svn: 51880
* Added "InitializeTU" to ASTConsumer. This is used by Sema::ParseAST to pass aTed Kremenek2008-05-311-1/+7
| | | | | | | | | | | TranslationUnit object instead of an ASTContext. By default it calls Initialize(ASTConstext& Context) (to match with the current interface used by most ASTConsumers). Modified the ObjC-Rewriter to use InitializeTU, and to tell the TranslationUnit to not free its Decls. This is a workaround for: <rdar://problem/5966749> llvm-svn: 51825
* Fix <rdar://problem/5917992> clang ObjC rewriter: #end from #if statement ↵Steve Naroff2008-05-311-3/+60
| | | | | | | | lost in translation. Some fancy footwork to accommodate embedded preprocessor directives within an interface. llvm-svn: 51815
* Fix <rdar://problem/5969777> clang ObjC rewriter: #imported file name ↵Steve Naroff2008-05-311-4/+1
| | | | | | | | | mysteriously commented out This fix involved tightening up needToScanForQualifiers(), which predated ObjCQualifiedIdType. It also includes a minor tweak to the code that searches for the beginning of the qualified type. If the AST contained the correct beginning of the declaration (i.e. the beginning of the declaration specifiers), this code would be more robust. Since it doesn't, we apply an adhoc heuristic. Note that DeclSpec contains this info...we just don't propagate it to the AST (at present). llvm-svn: 51812
* Hack RewriteObjC::RewriteObjCStringLiteral() to include the filename in the ↵Steve Naroff2008-05-311-0/+11
| | | | | | generated code (replacing any non-alphanumeric characters with "_"). This allows header files to contain ObjCStringLiterals. llvm-svn: 51811
* give location info to another paren expr.Chris Lattner2008-05-281-1/+2
| | | | llvm-svn: 51646
* minor changes, collect the range of an expr before rewriting the subexprsChris Lattner2008-05-231-14/+19
| | | | | | no functionality change. llvm-svn: 51497
* Explicitly #include Support/Streams.h when using llvm::cout and friends.Dan Gohman2008-05-211-0/+1
| | | | llvm-svn: 51391
* Fix rewriter bug <rdar://problem/5929344> clang ObjC rewriter: "extern int ↵Steve Naroff2008-05-151-4/+4
| | | | | | | | __CFConstantStringClassReference[];" should be extern "C". Have clang predefine OBJC_NEW_PROPERTIES (which is what gcc does). llvm-svn: 51163
* Fix <rdar://problem/5924225> clang ObjC rewriter: objc_exception_throw ↵Steve Naroff2008-05-091-1/+1
| | | | | | declaration in preamble does not match objc/objc-exception.h. llvm-svn: 50915
* Make sure the prototype for objc_msgSend_fpret() returns a double.Steve Naroff2008-05-081-3/+3
| | | | llvm-svn: 50873
* Fix <rdar://problem/5879237> clang objc rewriter: ivars not accessible in ↵Steve Naroff2008-05-081-34/+33
| | | | | | structure generated for class llvm-svn: 50862
* Fix <rdar://problem/5887874> clang ObjC rewriter: Use a different name for ↵Steve Naroff2008-05-071-3/+3
| | | | | | 'offsetof' macro llvm-svn: 50832
* Fix <rdar://problem/5908598> clang ObjC rewriter: typo in #pragma at endSteve Naroff2008-05-071-1/+1
| | | | llvm-svn: 50790
* Fix <rdar://problem/5879237> clang objc rewriter: ivars not accessible in ↵Steve Naroff2008-05-061-3/+29
| | | | | | structure generated for class llvm-svn: 50781
* Fix <rdar://problem/5888515> clang ObjC rewriter: Use objc.h for ↵Steve Naroff2008-05-061-15/+17
| | | | | | declarations instead of putting them in the preamble? llvm-svn: 50774
* Fix <rdar://problem/5881225> clang ObjC Rewriter: Protocol structure defined ↵Steve Naroff2008-05-061-1/+11
| | | | | | twice when two interfaces use it in same file llvm-svn: 50767
* Remove bogus cast (<rdar://problem/5874848> clang objc-rewriter: structure ↵Steve Naroff2008-04-181-1/+1
| | | | | | with list of protocols has wrong cast). llvm-svn: 49935
* Implement FIXME discoved by <rdar://problem/5874876> Rewriter: Explicit ivar ↵Steve Naroff2008-04-181-6/+5
| | | | | | refs outside a method are being rewritten llvm-svn: 49932
* Fix <rdar://problem/5874697> Rewriter: method arguments with complex types ↵Steve Naroff2008-04-181-6/+8
| | | | | | not being rewritten properly. llvm-svn: 49925
* Addition of TranslationUnitDecl to the AST:Argyrios Kyrtzidis2008-04-171-16/+19
| | | | | | | | -Added TranslationUnitDecl class to serve as top declaration context -ASTContext gets a TUDecl member and a getTranslationUnitDecl() function -All ScopedDecls get the TUDecl as DeclContext when declared at global scope llvm-svn: 49855
* Remove FileVarDecl and BlockVarDecl. They are replaced by ↵Steve Naroff2008-04-151-5/+5
| | | | | | | | VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl(). This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it). llvm-svn: 49748
* Remove bogus token...Steve Naroff2008-04-141-1/+1
| | | | llvm-svn: 49695
* Rename a file and update the Xcode project.Steve Naroff2008-04-141-0/+2990
llvm-svn: 49693
OpenPOWER on IntegriCloud