summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite
Commit message (Collapse)AuthorAgeFilesLines
...
* Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continueArgyrios Kyrtzidis2011-11-181-1/+2
| | | | | | parsing or false to abort parsing. llvm-svn: 144943
* objc rewriter: use a more specific name for local variable usedFariborz Jahanian2011-11-091-10/+10
| | | | | | in fast enumeration rewrite. // rdar://10415026 llvm-svn: 144191
* Change the AST representation of operations on Objective-CJohn McCall2011-11-061-333/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | property references to use a new PseudoObjectExpr expression which pairs a syntactic form of the expression with a set of semantic expressions implementing it. This should significantly reduce the complexity required elsewhere in the compiler to deal with these kinds of expressions (e.g. IR generation's special l-value kind, the static analyzer's Message abstraction), at the lower cost of specifically dealing with the odd AST structure of these expressions. It should also greatly simplify efforts to implement similar language features in the future, most notably Managed C++'s properties and indexed properties. Most of the effort here is in dealing with the various clients of the AST. I've gone ahead and simplified the ObjC rewriter's use of properties; other clients, like IR-gen and the static analyzer, have all the old complexity *and* all the new complexity, at least temporarily. Many thanks to Ted for writing and advising on the necessary changes to the static analyzer. I've xfailed a small diagnostics regression in the static analyzer at Ted's request. llvm-svn: 143867
* Restore r142914 and r142915, now with missing file and apparentJohn McCall2011-10-251-2/+2
| | | | | | GCC compiler workaround. llvm-svn: 142931
* Revert r142914 and r142915, due to possibly missing file.NAKAMURA Takumi2011-10-251-2/+2
| | | | | | r142914: "Introduce a placeholder type for "pseudo object"" r142915: "Pull the pseudo-object stuff into its own file." llvm-svn: 142921
* Introduce a placeholder type for "pseudo object"John McCall2011-10-251-2/+2
| | | | | | | | | | | | | | | expressions: expressions which refer to a logical rather than a physical l-value, where the logical object is actually accessed via custom getter/setter code. A subsequent patch will generalize the AST for these so that arbitrary "implementing" sub-expressions can be provided. Right now the only client is ObjC properties, but this should be generalizable to similar language features, e.g. Managed C++'s __property methods. llvm-svn: 142914
* objc rewriter: Restore objc_msgSend_stret/objc_msgSendSuper_stret declarationFariborz Jahanian2011-10-111-6/+6
| | | | | | to their fragile-abi representation. llvm-svn: 141735
* objc rewriter. Fix declaration of objc_msgSend_stret/objc_msgSendSuper_stret.Fariborz Jahanian2011-10-071-7/+12
| | | | | | | Fix an assert crash when casting a CF type to 'id'. // rdar://10250911 llvm-svn: 141369
* Rename TagDecl::isDefinition -> isCompleteDefinitionJohn McCall2011-10-071-2/+2
| | | | | | | for better self-documenting code, since the semantics are subtly different from getDefinition(). llvm-svn: 141355
* Improve location fidelity of objc decls.Argyrios Kyrtzidis2011-10-041-1/+1
| | | | | | | | -Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl. -Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the class name, not the location of '@'. llvm-svn: 141061
* ArrayRef'ize ObjCMessageExprArgyrios Kyrtzidis2011-10-031-6/+4
| | | | llvm-svn: 140986
* Introduce a pure virtual clone() method to DiagnosticConsumer, so thatDouglas Gregor2011-09-292-11/+5
| | | | | | | | | we have the ability to create a new, distict diagnostic consumer when we go off and build a module. This avoids the currently horribleness where the same diagnostic consumer sees diagnostics for multiple translation units (and multiple SourceManagers!) causing all sorts of havok. llvm-svn: 140743
* When 'bool' is not a built-in type but is defined as a macro, printDouglas Gregor2011-09-271-21/+21
| | | | | | | 'bool' rather than '_Bool' within types, to make things a bit more readable. Fixes <rdar://problem/10063263>. llvm-svn: 140650
* Rename DiagnosticInfo to Diagnostic as per issue 5397David Blaikie2011-09-262-2/+2
| | | | llvm-svn: 140493
* Rename IgnoringDiagClient to IgnoringDiagConsumer as per issue 5397David Blaikie2011-09-251-3/+3
| | | | llvm-svn: 140480
* Rename DiagnosticClient to DiagnosticConsumer as per issue 5397David Blaikie2011-09-252-2/+2
| | | | llvm-svn: 140479
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-253-13/+15
| | | | llvm-svn: 140478
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-6/+6
| | | | llvm-svn: 140367
* Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.Argyrios Kyrtzidis2011-09-192-34/+34
| | | | | | It already works (and is useful with) macro locs as well. llvm-svn: 140057
* Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear ↵Francois Pichet2011-09-171-10/+10
| | | | | | | | that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag. Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag. llvm-svn: 139987
* objc rewriter - more fixes to support compiling the rewrittenFariborz Jahanian2011-09-101-4/+10
| | | | | | | | | test case having instancetype. Fix in rewriter is unrelated to using of instancetype. Test case uses other feature not yet supported in the rewriter. There is more work to do, but this is an ongoing task and not urgent at this time. llvm-svn: 139473
* objc rewriter - Add rewriter test for new instancetypeFariborz Jahanian2011-09-091-1/+3
| | | | | | | | along with minor rewriter fix to handle that. This test is still incomplete due to rewriter issues unrelated to instancetype. llvm-svn: 139403
* Give conversions of block pointers to ObjC pointers a different cast kindJohn McCall2011-09-091-11/+39
| | | | | | | | than conversions of C pointers to ObjC pointers. In order to ensure that we've caught every case, add asserts to CastExpr that strictly determine which cast kind is used for which kind of bit cast. llvm-svn: 139352
* Fix a rewriter bug caused by recent changes in objc's Fariborz Jahanian2011-08-291-26/+65
| | | | | | group decls. llvm-svn: 138772
* objective-c: Treat top-level objective-c declarationsFariborz Jahanian2011-08-271-25/+28
| | | | | | | | | | , such as list of forward @class decls, in a DeclGroup node. Deal with its consequence throught clang. This is in preparation for more Sema work ahead. // rdar://8843851. Feel free to reverse if it breaks something important and I am unavailable. llvm-svn: 138709
* 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
OpenPOWER on IntegriCloud