summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite
Commit message (Collapse)AuthorAgeFilesLines
* objc rewriter: Fixes a rewriting of implicit casting of an integralFariborz Jahanian2011-08-041-1/+5
| | | | | | argument to bool. // rdar://9899834 llvm-svn: 136946
* objective-c rewrite: Fixes rewriting of objective-c collectionFariborz Jahanian2011-08-021-1/+9
| | | | | | statement inside a block. // rdar://9878420 llvm-svn: 136717
* objc rewriter - my last patch was not quite right.Fariborz Jahanian2011-07-301-2/+8
| | | | | | Fixed again. // rdar://9846759 llvm-svn: 136550
* objc rewriter - set the flag passed to ↵Fariborz Jahanian2011-07-301-2/+2
| | | | | | | | _Block_object_assign/_Block_object_dispose correctly for copying a captured block object. // rdar://9846759 llvm-svn: 136549
* Add support for C++0x unicode string and character literals, from Craig Topper!Douglas Gregor2011-07-272-9/+19
| | | | llvm-svn: 136210
* Rename getInstantiationLineNumber to getExpansionLineNumber in bothChandler Carruth2011-07-251-2/+2
| | | | | | SourceManager and FullSourceLoc. llvm-svn: 135969
* Rename SourceManager::getInstantiationRange to getExpansionRange.Chandler Carruth2011-07-251-1/+1
| | | | llvm-svn: 135915
* Mechanically rename SourceManager::getInstantiationLoc andChandler Carruth2011-07-253-10/+10
| | | | | | | | FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part of the API and documentation update from 'instantiation' as the term for macros to 'expansion'. llvm-svn: 135914
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-2310-118/+109
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Switch a comment in Rewrite from 'instantiation' to 'expansion'.Chandler Carruth2011-07-151-1/+1
| | | | llvm-svn: 135226
* Make more use of llvm::StringRef in various APIs. In particular, don'tJay Foad2011-06-211-13/+7
| | | | | | use the deprecated forms of llvm::StringMap::GetOrCreateValue(). llvm-svn: 133515
* Automatic Reference Counting.John McCall2011-06-152-28/+48
| | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
* Implement support for C++11 in-class initialization of non-static data members.Richard Smith2011-06-111-5/+10
| | | | llvm-svn: 132878
* Replace a literal 8 with Context->getCharWidth() inKen Dyck2011-04-301-1/+1
| | | | | | SynthesizeByrefCopyDestroyHelper(). No change in functionality intended. llvm-svn: 130608
* Use S.str() to force a flush.Fariborz Jahanian2011-04-201-3/+1
| | | | llvm-svn: 129856
* Be sure to flush raw_string_ostream objects in the Objective-CDouglas Gregor2011-04-201-0/+2
| | | | | | rewriter, from Eric Niebler! llvm-svn: 129849
* Introduce Rewriter::IncreaseIndentation() which increase indentations for ↵Argyrios Kyrtzidis2011-04-161-0/+83
| | | | | | | | | the lines between the given source range. To determine what the indentation should be, a SourceLocation 'parentIndent' parameter is used that should be at a source location with an indentation one degree lower than the given range. llvm-svn: 129628
* Support for C++11 (non-template) alias declarations.Richard Smith2011-04-151-3/+3
| | | | llvm-svn: 129567
* 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
OpenPOWER on IntegriCloud