summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite
Commit message (Collapse)AuthorAgeFilesLines
...
* fix a bunch of comment typos found by codespell. Patch byChris Lattner2011-04-151-2/+2
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129559
* Add a flag to StringLiteral to keep track of whether the string is a pascal ↵Anders Carlsson2011-04-141-7/+9
| | | | | | string or not. llvm-svn: 129488
* Collect the options applicable to the Rewriter methods into a ↵Argyrios Kyrtzidis2011-04-131-8/+10
| | | | | | RewriterOptions struct. llvm-svn: 129430
* Fixup more objc rwriter bug having to do withFariborz Jahanian2011-04-112-9/+23
| | | | | | | rewriting of blocks which have objective-c stuff which need be rewritten as well. // rdar://9254348 llvm-svn: 129300
* Fixes a rewrting bug of a property-dot syntax expression insideFariborz Jahanian2011-04-081-0/+1
| | | | | | a block. First part of // rdar://9254348 llvm-svn: 129171
* Enhance the Rewriter.Argyrios Kyrtzidis2011-04-071-7/+76
| | | | | | | -Allow removing a line completely if it ends up empty -Provide more control on what should be removed. llvm-svn: 129085
* Fixes a rewriter bug rewriting call to a byrefFariborz Jahanian2011-04-011-19/+2
| | | | | | block pointer nested inside a block. // rdar:// 9204669 llvm-svn: 128747
* ANother rewrite bug, rewriting a call ofFariborz Jahanian2011-04-011-1/+2
| | | | | | __byref block. // rdar://9204669 llvm-svn: 128726
* Fix couple of rewriter bugs related to rewriting aFariborz Jahanian2011-03-311-3/+11
| | | | | | __block block declaration. //rdar://9204669 llvm-svn: 128682
* Add support for the OpenCL vec_step operator, by generalising andPeter Collingbourne2011-03-111-4/+5
| | | | | | | extending the existing support for sizeof and alignof. Original patch by Guy Benyei. llvm-svn: 127475
* Fixed InnerLocStart.Abramo Bagnara2011-03-091-8/+11
| | | | llvm-svn: 127330
* Fixed source range for all DeclaratorDecl's.Abramo Bagnara2011-03-081-11/+27
| | | | llvm-svn: 127225
* Fixed TypedefDecl and TemplateTypeParameter source range.Abramo Bagnara2011-03-061-1/+1
| | | | llvm-svn: 127119
* Fix objc rewriting bug casting to qualified objective-c pointetr.Fariborz Jahanian2011-02-261-3/+3
| | | | | | // rdar://9056351 llvm-svn: 126536
* Fix a rewriter bug involving call to property'sFariborz Jahanian2011-02-261-5/+6
| | | | | | block. // rdar://9055596 llvm-svn: 126535
* Fix a rewrite bug. // rdar://9039342Fariborz Jahanian2011-02-241-1/+9
| | | | llvm-svn: 126435
* Change the representation of GNU ?: expressions to use a different expressionJohn McCall2011-02-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | class and to bind the shared value using OpaqueValueExpr. This fixes an unnoticed problem with deserialization of these expressions where the deserialized form would lose the vital pointer-equality trait; or rather, it fixes it because this patch also does the right thing for deserializing OVEs. Change OVEs to not be a "temporary object" in the sense that copy elision is permitted. This new representation is not totally unawkward to work with, but I think that's really part and parcel with the semantics we're modelling here. In particular, it's much easier to fix things like the copy elision bug and to make the CFG look right. I've tried to update the analyzer to deal with this in at least some obvious cases, and I think we get a much better CFG out, but the printing of OpaqueValueExprs probably needs some work. llvm-svn: 125744
* Block rewriting bug. Don't take address of captured Fariborz Jahanian2011-02-161-1/+17
| | | | | | | byref variables again when passing them to inner blocks. // rdar://9006279 llvm-svn: 125690
* Give some convenient idiomatic accessors to Stmt::child_range andJohn McCall2011-02-131-18/+9
| | | | | | | Stmt::const_child_range, then make a bunch of places use them instead of the individual iterator accessors. llvm-svn: 125450
* CMake: LLVM_NO_RTTI must be obsolete now!NAKAMURA Takumi2011-02-101-2/+0
| | | | llvm-svn: 125275
* A few more tweaks to the blocks AST representation: John McCall2011-02-071-1/+2
| | | | | | | | | | | | | | | | | - BlockDeclRefExprs always store VarDecls - BDREs no longer store copy expressions - BlockDecls now store a list of captured variables, information about how they're captured, and a copy expression if necessary With that in hand, change IR generation to use the captures data in blocks instead of walking the block independently. Additionally, optimize block layout by emitting fields in descending alignment order, with a heuristic for filling in words when alignment of the end of the block header is insufficient for the most aligned field. llvm-svn: 125005
* Fix an objective-c rewriter bug rewriting a __block Fariborz Jahanian2011-01-271-5/+7
| | | | | | | variable declaration of a struct declared type. // rdar://8918702 llvm-svn: 124451
* Change QualType::getTypePtr() to return a const pointer, then change aJohn McCall2011-01-191-3/+3
| | | | | | thousand other things which were (generally inadvertantly) relying on that. llvm-svn: 123814
* Fix warnings found by gcc-4.6, from -Wunused-but-set-variable andJeffrey Yasskin2011-01-181-2/+0
| | | | | | -Wint-to-pointer-cast. llvm-svn: 123719
* Clang should not warn on code in clang that is only there to remove warnings.Jakob Stoklund Olesen2011-01-061-1/+1
| | | | llvm-svn: 122941
* Introduced raw_identifier token kind.Abramo Bagnara2010-12-223-14/+14
| | | | llvm-svn: 122394
* Replace all uses of PathV1::get{Basename,Dirname,Suffix} with their PathV2 ↵Michael J. Spencer2010-12-181-5/+4
| | | | | | equivalents. llvm-svn: 122140
* Added missing IgnoreParens().Abramo Bagnara2010-12-141-1/+2
| | | | llvm-svn: 121795
* Restore r121752 without modification.John McCall2010-12-141-68/+43
| | | | llvm-svn: 121763
* Pull out r121752 in case it's causing the selfhost breakage.John McCall2010-12-141-43/+68
| | | | llvm-svn: 121759
* Factor out most of the extra state in a FunctionProtoType into a separateJohn McCall2010-12-141-68/+43
| | | | | | | class to be passed around. The line between argument and return types and everything else is kindof vague, but I think it's justifiable. llvm-svn: 121752
* Keep the source location of the selector in ObjCMessageExpr.Argyrios Kyrtzidis2010-12-101-4/+8
| | | | llvm-svn: 121516
* Fix rewriter to match recent changes in property refFariborz Jahanian2010-12-041-3/+11
| | | | | | AST. llvm-svn: 120919
* Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ↵John McCall2010-12-021-49/+33
| | | | | | | | ObjCPropertyRefExpr into the latter. llvm-svn: 120643
* Merge System into Support.Michael J. Spencer2010-11-293-3/+3
| | | | llvm-svn: 120297
* Minor whitespace fix, no functionality changeNico Weber2010-11-221-3/+3
| | | | llvm-svn: 119965
* Keep track of errors/warnings in FixItRewriter.Argyrios Kyrtzidis2010-11-181-0/+3
| | | | llvm-svn: 119735
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-182-2/+3
| | | | | | | | | | | -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. llvm-svn: 119730
* Add an assertion, fix a whole bunch of bugs, comment the assertionJohn McCall2010-11-181-2/+2
| | | | | | out because there are still bugs left. llvm-svn: 119722
* Calculate the value kind of an expression when it's created andJohn McCall2010-11-181-60/+92
| | | | | | | | | | | | | store it on the expression node. Also store an "object kind", which distinguishes ordinary "addressed" l-values (like variable references and pointer dereferences) and bitfield, @property, and vector-component l-values. Currently we're not using these for much, but I aim to switch pretty much everything calculating l-valueness over to them. For now they shouldn't necessarily be trusted. llvm-svn: 119685
* Kill CK_Unknown references in the ObjC rewriter. The actualJohn McCall2010-11-151-27/+27
| | | | | | | choice of cast doesn't matter here, but I've tried to choose the right one anyway. llvm-svn: 119140
* Fixes a rewrite bug, rewriting nested property usage Fariborz Jahanian2010-11-081-0/+5
| | | | | | inside blocks. Fixes //rdar: //8608293. llvm-svn: 118425
* Proper rewriting of block envokation with Fariborz Jahanian2010-11-051-1/+13
| | | | | | | qualified ObjC pointer types in its argument list. // rdar: //8608902 llvm-svn: 118286
* Fixes a rewriting bug when type in a block argument typeFariborz Jahanian2010-11-031-3/+7
| | | | | | is a objc qualified class type. // rdar: //8608902 llvm-svn: 118208
* Patch to rewrite objc qualified types which occur inFariborz Jahanian2010-11-031-7/+57
| | | | | | | block pointer type arguments. Partial fix for // rdar: //8608902 llvm-svn: 118205
* Correct typos and whitespace, spotted by Nico Weber!Nick Lewycky2010-10-311-3/+3
| | | | llvm-svn: 117871
* More class anonymization.Benjamin Kramer2010-10-221-0/+2
| | | | llvm-svn: 117106
* Fixes a potential crash in rewriter when sending message Fariborz Jahanian2010-10-201-12/+17
| | | | | | to 'super'. llvm-svn: 116928
* GCC 4.4 warns that Receiver may be used uninitialized in this function.Duncan Sands2010-10-201-1/+1
| | | | | | | | | As far as I can see, gcc is right to think this! The following change will cause a nice segfault rather than undefined behaviour if this case occurs. Someone who understands what this code is supposed to do should probably take a proper look. llvm-svn: 116917
* Do not rewrite new accessor if user has defined accessors.Fariborz Jahanian2010-10-191-52/+57
| | | | | | Fixes //rdar: // 8570020. llvm-svn: 116882
OpenPOWER on IntegriCloud