summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite
Commit message (Collapse)AuthorAgeFilesLines
...
* Silence uninitialized value warning.Ted Kremenek2010-10-191-1/+1
| | | | llvm-svn: 116877
* Fix a rewriting bug of rewriting properties declared inFariborz Jahanian2010-10-161-24/+25
| | | | | | protocols. // rdar: //8558702 llvm-svn: 116652
* Rewrite bug fix rewriting a property assignment whenFariborz Jahanian2010-10-141-0/+6
| | | | | | its RHS is an ivar. Fixes //rdar: //8541517. llvm-svn: 116539
* Eliminate usage of ObjCSuperExpr used forFariborz Jahanian2010-10-141-11/+41
| | | | | | | 'super' as receiver of property or a setter/getter methods. //rdar: //8525788 llvm-svn: 116483
* Some refactoring of property rewriting stuff Fariborz Jahanian2010-10-111-17/+11
| | | | | | in rewriter. No functionality change. llvm-svn: 116254
* This patch does a few things in the area of objective-cFariborz Jahanian2010-10-111-58/+103
| | | | | | | | | | | properties. 1. Generates the AST for lexical info. of accessing getter/setter methods using dot-syntax notation. This fixes //rdar: //8528170. 2. Modifes rewriter to handle the AST putout in 1. 3. Supportes in rewriter ObjCImplicitSetterGetter ASTs. llvm-svn: 116237
* When dealing with an assignment with LHS being a property referenceFariborz Jahanian2010-10-081-0/+9
| | | | | | | | | expression, the entire assignment tree is rewritten into a property setter messaging. This includes rewriting the RHS. Do not attempt to rewrite RHS again. Never rewrite a rewritten text! Fixes //rdar: //8527018. llvm-svn: 116104
* Fix a block rewriter bug where copy/dispose entries in Fariborz Jahanian2010-10-051-0/+6
| | | | | | | | block descriptor for outer block was missing even though the block was importing objects into its inner blocks. //rdar://84995992 llvm-svn: 115644
* Rewriting array element type of qualified-id.Fariborz Jahanian2010-09-301-0/+4
| | | | | | Fixes rdra://8475819. llvm-svn: 115201
* Fix rewriting of property declared in @protocol's.Fariborz Jahanian2010-09-241-0/+4
| | | | | | Fixed //rdar://8472487. llvm-svn: 114741
* Revert "CMake: Update to use standard CMake dependency tracking facilities ↵Michael J. Spencer2010-09-131-9/+3
| | | | | | | | | | | | | instead" This reverts commit r113631 Conflicts: CMakeLists.txt lib/CodeGen/CMakeLists.txt llvm-svn: 113817
* CMake: Update to use standard CMake dependency tracking facilities insteadMichael J. Spencer2010-09-101-3/+9
| | | | | | of whatever we were using before... llvm-svn: 113631
* Clean up CMake dependenciesDouglas Gregor2010-09-091-1/+1
| | | | llvm-svn: 113489
* Clean up some of the CMake dependenciesDouglas Gregor2010-09-081-1/+3
| | | | llvm-svn: 113416
* zap more dead code.Chris Lattner2010-09-041-3/+3
| | | | llvm-svn: 113076
* "I see dead code". IdempotentOperationChecker::isTruncationExtensionAssignmentChris Lattner2010-09-031-8/+2
| | | | | | | | | should probably be removed if it has no purpose, but I just #if'd it out in case it's usefulIdempotentOperationChecker::isTruncationExtensionAssignment should probably be removed if it has no purpose, but I just #if'd it out in case it's useful llvm-svn: 112949
* AST work to support [C++] [IRgen] for ?: with missing LHSFariborz Jahanian2010-08-311-3/+6
| | | | | | | This is also pr7726 and wip. No change in functionality at this time. llvm-svn: 112612
* Fix CMake dependenciesDouglas Gregor2010-08-301-0/+6
| | | | llvm-svn: 112475
* Fix the memory leak of FloatingLiteral/IntegerLiteral.Argyrios Kyrtzidis2010-08-281-5/+6
| | | | | | | | | | | For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers. Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with the APFloat/APInt values will never get freed. I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral. Fixes rdar://7637185 llvm-svn: 112361
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-27/+27
| | | | | | This lets us remove Sema.h's dependency on Expr.h and Decl.h. llvm-svn: 112156
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-40/+40
| | | | | | to the new constants. llvm-svn: 112047
* More incremental progress towards not including Expr.h in Sema.h.John McCall2010-08-251-1/+1
| | | | llvm-svn: 112044
* Fix crasher with IgnoringDiagClientDouglas Gregor2010-08-181-2/+1
| | | | llvm-svn: 111447
* Simplify the ownership model for DiagnosticClients, which was reallyDouglas Gregor2010-08-181-1/+4
| | | | | | | convoluted and a bit leaky. Now, the Diagnostic object owns its DiagnosticClient. llvm-svn: 111437
* Simplify FixItHint by eliminated the unnecessary InsertionLocDouglas Gregor2010-08-181-12/+0
| | | | | | location. Patch by Eelis van der Weegen! llvm-svn: 111362
* StringRef'ication of lots stuff, patch by Peter Davies!Daniel Dunbar2010-08-171-52/+52
| | | | llvm-svn: 111314
* Make the FixItOptions object required instead of optional.Nick Lewycky2010-08-152-5/+9
| | | | llvm-svn: 111105
* Remove dead code, caught by unused function warnings.Argyrios Kyrtzidis2010-08-151-63/+0
| | | | llvm-svn: 111091
* Remember that FixItOptions* is optional and don't crash when it's not provided.Nick Lewycky2010-08-141-1/+1
| | | | llvm-svn: 111084
* Add a new cc1 option -fix-what-you-can which when combined with the fix-it modeNick Lewycky2010-08-132-12/+15
| | | | | | will apply all fixes even when there were other errors in the file. llvm-svn: 111020
* Store inheritance paths after CastExprs instead of inside them.John McCall2010-08-071-5/+4
| | | | | | | | | | | | | | | This takes some trickery since CastExpr has subclasses (and indeed, is abstract). Also, smoosh the CastKind into the bitfield from Expr. Drops two words of storage from Expr in the common case of expressions which don't need inheritance paths. Avoids a separate allocation and another word of overhead in cases needing inheritance paths. Also has the advantage of not leaking memory, since destructors for AST nodes are never run. llvm-svn: 110507
* Initialize block's imported variable(s) in Fariborz Jahanian2010-07-281-19/+30
| | | | | | | block's synthesized constructor initalizer list. Fixes radar 8240371. llvm-svn: 109698
* Fix source location of the initializer in Fariborz Jahanian2010-07-211-8/+0
| | | | | | | a copy initialization. Back out hack in objc rewriter. fixes radar 8213998. llvm-svn: 109024
* Fix a rewriter bug which originates in SemaInit involvingFariborz Jahanian2010-07-211-4/+11
| | | | | | | Constructor Initialization which computes Source Location differently now. Fixes radar 8213998. llvm-svn: 109018
* Update ImplicitCastExpr to be able to represent an XValue.Sebastian Redl2010-07-201-2/+4
| | | | llvm-svn: 108807
* BUILD_ARCHIVE is the default for libraries, no need to set it.Chris Lattner2010-07-181-1/+0
| | | | llvm-svn: 108633
* Pass StringRefs by value.Benjamin Kramer2010-07-141-4/+4
| | | | llvm-svn: 108375
* When forming a function call or message send expression, be sure toDouglas Gregor2010-07-131-2/+2
| | | | | | | | | | | | | | | | | strip cv-qualifiers from the expression's type when the language calls for it: in C, that's all the time, while C++ only does it for non-class types. Centralized the computation of the call expression type in QualType::getCallResultType() and some helper functions in other nodes (FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant callers of getResultType() to getCallResultType(). Fixes PR7598 and PR7463, along with a bunch of getResultType() call sites that weren't stripping references off the result type (nothing stripped cv-qualifiers properly before this change). llvm-svn: 108234
* Remove Decl::getCompoundBody().Argyrios Kyrtzidis2010-07-071-1/+1
| | | | | | | | This has 2 (slight) advantages: -Make explicit at getBody()'s callsite that we expect/handle only CompoundStmt and not CXXTryStmt. -Better tracking of Decl::getBody()'s callsites. llvm-svn: 107771
* Rewriter: Use the appropriate printing context instead of the defaultDaniel Dunbar2010-06-301-16/+23
| | | | | | constructed one -- this is necessary to ensure types get printed correctly. llvm-svn: 107312
* introduce a new CharSourceRange class, and enhance the diagnostics routinesChris Lattner2010-06-181-3/+9
| | | | | | | | | | | | | | | to use them instead of SourceRange. CharSourceRange is just a SourceRange plus a bool that indicates whether the range has the end character resolved or whether the end location is the start of the end token. While most of the compiler wants to think of ranges that have ends that are the start of the end token, the printf diagnostic stuff wants to highlight ranges within tokens. This is transparent to the diagnostic stuff. To start taking advantage of the new capabilities, you can do something like this: Diag(..) << CharSourceRange::getCharRange(Begin,End) llvm-svn: 106338
* Break Frontend's dependency on Rewrite, Checker and CodeGen in shared ↵Daniel Dunbar2010-06-157-0/+6407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | library configuration Currently, all AST consumers are located in the Frontend library, meaning that in a shared library configuration, Frontend has a dependency on Rewrite, Checker and CodeGen. This is suboptimal for clients which only wish to make use of the frontend. CodeGen in particular introduces a large number of unwanted dependencies. This patch breaks the dependency by moving all AST consumers with dependencies on Rewrite, Checker and/or CodeGen to their respective libraries. The patch therefore introduces dependencies in the other direction (i.e. from Rewrite, Checker and CodeGen to Frontend). After applying this patch, Clang builds correctly using CMake and shared libraries ("cmake -DBUILD_SHARED_LIBS=ON"). N.B. This patch includes file renames which are indicated in the patch body. Changes in this revision of the patch: - Fixed some copy-paste mistakes in the header files - Modified certain aspects of the coding to comply with the LLVM Coding Standards llvm-svn: 106010
* Fix:Chris Lattner2010-06-141-1/+1
| | | | | | | | | | | | Decl.cpp:716:28: warning: initialization of pointer of type 'clang::VarDecl *' from literal 'false' [-Wbool-conversions] VarDecl *LastTentative = false; ^ RewriteRope.cpp:535:12: warning: initialization of pointer of type '<anonymous>::RopePieceBTreeNode *' from literal 'false' [-Wbool-conversions] return false; ^ llvm-svn: 105946
* Makefiles: Set Clang CPP compiler flags in a single location, instead of ↵Daniel Dunbar2010-06-081-2/+0
| | | | | | scattered throughout the project Makefiles. llvm-svn: 105638
* Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.Daniel Dunbar2010-06-081-2/+2
| | | | | | - This eliminates most dependencies on how Clang is installed relative to LLVM. llvm-svn: 105637
* Add a write(raw_ostream&) method to RewriteBuffer. This uses an inefficientNick Lewycky2010-04-161-2/+6
| | | | | | | implementation today but is the right place if we want to make it faster some day. llvm-svn: 101521
* make the token paste avoidance logic turn "..." into ".. ." instead of ". . ."Chris Lattner2010-04-141-1/+3
| | | | | | when avoiding paste. Patch by David Peixotto! llvm-svn: 101218
* Let SourceManager::getBufferData return StringRef instead of a pair of two ↵Benjamin Kramer2010-03-162-3/+3
| | | | | | const char*. llvm-svn: 98630
* Give SourceManager a Diagnostic object with which to report errors,Douglas Gregor2010-03-162-21/+4
| | | | | | and start simplifying the interfaces in SourceManager that can fail. llvm-svn: 98594
* Add some <cstdio> includes to unbreak the buildbotsDouglas Gregor2010-03-152-0/+2
| | | | llvm-svn: 98591
OpenPOWER on IntegriCloud