summaryrefslogtreecommitdiffstats
path: root/clang/lib/Edit
Commit message (Collapse)AuthorAgeFilesLines
* Remove autoconf supportChris Bieneman2016-01-261-14/+0
| | | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 llvm-svn: 258862
* [Bugfix] Fix ICE on constexpr vector splat.George Burgess IV2016-01-131-0/+3
| | | | | | | | | | | | | In {CG,}ExprConstant.cpp, we weren't treating vector splats properly. This patch makes us treat splats more properly. Additionally, this patch adds a new cast kind which allows a bool->int cast to result in -1 or 0, instead of 1 or 0 (for true and false, respectively), so we can sanely model OpenCL bool->int casts in the AST. Differential Revision: http://reviews.llvm.org/D14877 llvm-svn: 257559
* Replace double negation of !FileID.isInvalid() with FileID.isValid().Yaron Keren2015-10-031-1/+1
| | | | | | +couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228. llvm-svn: 249235
* [Edit] Fix issue with tracking what macro argument inputs have been edited.Argyrios Kyrtzidis2015-09-111-14/+66
| | | | | | This was not working correctly, leading to erroneously rejecting valid edits. llvm-svn: 247462
* [Edit] Use StringRef's copy method. No functional change intended.Benjamin Kramer2015-08-041-1/+1
| | | | llvm-svn: 243968
* [edit] Don't hit an assert when trying to delete a trailing space at EOFBenjamin Kramer2015-03-291-1/+3
| | | | | | | The buffer is guaranteed to be zero-terminated so we can just circumvent the check. Found by afl-fuzz. llvm-svn: 233496
* Remove many superfluous SmallString::str() calls.Yaron Keren2015-03-181-3/+3
| | | | | | | | | | | | | | | Now that SmallString is a first-class citizen, most SmallString::str() calls are not required. This patch removes a whole bunch of them, yet there are lots more. There are two use cases where str() is really needed: 1) To use one of StringRef member functions which is not available in SmallString. 2) To convert to std::string, as StringRef implicitly converts while SmallString do not. We may wish to change this, but it may introduce ambiguity. llvm-svn: 232622
* Edit: Do not extend a removal to include trailing whitespace if we're at the endBenjamin Kramer2014-09-151-0/+6
| | | | | | | | | | of the file. This would run past the end of the buffer. Sadly I don't have a great way to test it, the only way to trigger the bug is having a removal fix it at the end of the file, which none of our current warnings can generate. llvm-svn: 217766
* Objective-C modernization. Convert -initWithUTF8String messagingFariborz Jahanian2014-08-251-1/+2
| | | | | | with auto-boxing syntax for literals. rdar://18080352 llvm-svn: 216405
* [CMake] Reorder libdeps by alphabetical order.NAKAMURA Takumi2014-07-141-1/+1
| | | | llvm-svn: 212919
* [C++11] Use 'nullptr'.Craig Topper2014-05-092-5/+5
| | | | llvm-svn: 208392
* [objcmt] Revert r191796, it's not needed anymore.Argyrios Kyrtzidis2014-04-281-7/+5
| | | | | | rdar://16223810 llvm-svn: 207391
* Avoid a local Twine variable.Benjamin Kramer2014-03-291-4/+2
| | | | | | Harmless in this case but potentially dangerous if it gets extended some day. llvm-svn: 205107
* [CMake] Use LINK_LIBS instead of target_link_libraries().NAKAMURA Takumi2014-02-261-2/+1
| | | | llvm-svn: 202238
* [CMake] Get rid of explicit dependencies to include/clang/*.inc and ↵NAKAMURA Takumi2014-02-211-9/+0
| | | | | | | | | | | | | | | | | | | introduce CLANG_TABLEGEN_TARGETS. This does; - clang_tablegen() adds each tblgen'd target to global property CLANG_TABLEGEN_TARGETS as list. - List of targets is added to LLVM_COMMON_DEPENDS. - all clang libraries and targets depend on generated headers. You might wonder this would be regression, but in fact, this is little loss. - Almost all of clang libraries depend on tblgen'd files and clang-tblgen. - clang-tblgen may cause short stall-out but doesn't cause unconditional rebuild. - Each library's dependencies to tblgen'd files might vary along headers' structure. It made hard to track and update *really optimal* dependencies. Each dependency to intrinsics_gen and ClangSACheckers is left as DEPENDS. llvm-svn: 201842
* Add front-end infrastructure now address space casts are in LLVM IR.David Tweed2013-12-111-0/+1
| | | | | | | | | | With the introduction of explicit address space casts into LLVM, there's a need to provide a new cast kind the front-end can create for C/OpenCL/CUDA and code to produce address space casts from those kinds when appropriate. Patch by Michele Scandale! llvm-svn: 197036
* [CMake] clang/lib: Satisfy dependencies to add *actually used* libraries on ↵NAKAMURA Takumi2013-12-091-0/+4
| | | | | | | | target_link_libraries() and LLVM_LINK_COMPONENTS. I will prune redundant dependencies later. llvm-svn: 196800
* ObjectiveC migrator: When doing migration, migrator must suggestFariborz Jahanian2013-10-011-5/+7
| | | | | | | | migration of headers which have become system headers by user having put the .system_framework in the sdk directory. // rdar://15066802 llvm-svn: 191796
* ObjectiveC migrator: Remove semicolon after the typedefFariborz Jahanian2013-07-181-92/+0
| | | | | | | declaration when converting to NS_ENUM. This required some code refactoring. llvm-svn: 186619
* ObjectiveC migration. migration to NS_ENUM/SN_OPTIONFariborz Jahanian2013-07-181-0/+13
| | | | | | - wip. llvm-svn: 186604
* ObjectiveC migration: complete migrating classFariborz Jahanian2013-07-161-22/+22
| | | | | | | declaration to include list of protocols class conforms to. llvm-svn: 186443
* ObjC migrator: build conforming interfaceFariborz Jahanian2013-07-161-0/+32
| | | | | | declaration (not yet used). wip. llvm-svn: 186369
* ObjC migrator: Improve on hueristics.Fariborz Jahanian2013-07-101-5/+20
| | | | | | | | | | | | migrate to 'copy attribute if Object class implements NSCopying otherwise assume implied 'strong'. Remove lifetime qualifier on property as it has moved to property's attribute. Added TODO comment for future work by poking into setter implementation. llvm-svn: 186037
* objc migrator: More refinment of propertyFariborz Jahanian2013-07-101-9/+9
| | | | | | | attributes in migration. Specialli use of 'copy' attribute for retainable object types. llvm-svn: 185985
* [Objective-C migrator] replace candidate user setter/getter withFariborz Jahanian2013-07-082-2/+28
| | | | | | their equivalent property declaration. wip. llvm-svn: 185873
* [objc migrator]: More knobs to do migration toFariborz Jahanian2013-07-051-0/+6
| | | | | | use of objc's properties. llvm-svn: 185724
* [objcmt] Fix a mishandled conversion to objc directory literal.Argyrios Kyrtzidis2013-04-061-0/+2
| | | | | | rdar://13181413 llvm-svn: 178942
* Include llvm::Optional in clang/Basic/LLVM.hDavid Blaikie2013-02-201-3/+3
| | | | | | Post-commit CR feedback from Jordan Rose regarding r175594. llvm-svn: 175679
* Remove an unneeded const_castDmitri Gribenko2013-02-141-3/+2
| | | | llvm-svn: 175160
* Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.Jordan Rose2013-02-081-9/+5
| | | | | | | Nearly all of these changes are one-to-one replacements; the few that aren't have to do with custom identifier validation. llvm-svn: 174768
* Implement OpenCL event_t as Clang builtin type, including event_t related ↵Guy Benyei2013-01-201-0/+1
| | | | | | OpenCL restrictions (OpenCL 1.2 spec 6.9) llvm-svn: 172973
* [objcmt] Rewrite a NSDictionary dictionaryWithObjects:forKeys: to a ↵Argyrios Kyrtzidis2013-01-161-4/+158
| | | | | | | | | | | | | | | | | | dictionary literal if we can see the elements of the arrays. for example: NSDictionary *dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"1", @"2", nil] forKeys:[NSArray arrayWithObjects:@"A", @"B", nil]]; --> NSDictionary *dict = @{ @"A" : @"1", @"B" : @"2" }; rdar://12428166 llvm-svn: 172679
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-3/+3
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* EditedSource.cpp: Appease msvc, to add <cctype>.NAKAMURA Takumi2012-12-211-0/+1
| | | | llvm-svn: 170817
* Use some heuristics so that when a fixit removes a source range, we tryArgyrios Kyrtzidis2012-12-201-3/+72
| | | | | | | | | | | | | | | | | | | | to also remove a trailing space if possible. For example, removing '__bridge' from: i = (__bridge I*)p; should result in: i = (I*)p; not: i = ( I*)p; rdar://11314821 llvm-svn: 170764
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-043-5/+5
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Refactor recording the preprocessor conditional directive regions out ofArgyrios Kyrtzidis2012-12-041-2/+2
| | | | | | | | | PreprocessingRecord and into its own class, PPConditionalDirectiveRecord. Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord without needing a PreprocessingRecord. llvm-svn: 169229
* Change the representation of builtin functions in the ASTEli Friedman2012-08-311-0/+1
| | | | | | | | | (__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. llvm-svn: 162962
* clang/lib: [CMake] Update tblgen'd dependencies.NAKAMURA Takumi2012-07-271-0/+5
| | | | llvm-svn: 160851
* clang/lib: [CMake] Reformat, alphabetize lists.NAKAMURA Takumi2012-07-271-1/+1
| | | | llvm-svn: 160850
* Add libEdit dependency on ClangDiagnosticCommon. Hopefully this will ↵Ted Kremenek2012-07-161-0/+4
| | | | | | unbreak the VS build. llvm-svn: 160309
* [objcmt] Check for classes that accept 'objectForKey:' (or the other selectorsArgyrios Kyrtzidis2012-07-061-5/+70
| | | | | | | | | | | | that the migrator handles) but return their instances as 'id', resulting in the compiler resolving 'objectForKey:' as the method from NSDictionary. When checking if we can convert to subscripting syntax, check whether the receiver is a result of a class method from a hardcoded list of such classes. In such a case return the specific class as the interface of the receiver. llvm-svn: 159788
* [objcmt] Allow migrating to subscripting syntax for other classesArgyrios Kyrtzidis2012-07-051-15/+25
| | | | | | | | | (apart from NSDictionary/NSArray) that implement objectForKey:/objectAtIndex/etc. and the subscripting methods as well. Part of rdar://11734969 llvm-svn: 159783
* Drop the ASTContext.h include from Stmt.h and fix up transitive users.Benjamin Kramer2012-07-041-0/+1
| | | | | | | | | | | | | | This required moving the ctors for IntegerLiteral and FloatingLiteral out of line which shouldn't change anything as they are usually called through Create methods that are already out of line. ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector and make it independent from ASTContext.h Pass the StorageAllocator directly to AccessedEntity so it doesn't need to have a definition of ASTContext around. llvm-svn: 159718
* Fix uninitialized variable use bug found by the clairvoyant static analyzer.Argyrios Kyrtzidis2012-06-271-0/+1
| | | | | | | Commit::canReplaceText would not initialize its out 'Len' parameter before returning true and it would be used uninitialized in Commit::replaceText. llvm-svn: 159306
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-2/+6
| | | | | | | | | express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. llvm-svn: 158888
* [objcmt] Have the modern objc migration warning change from:Argyrios Kyrtzidis2012-06-201-2/+3
| | | | | | | | | | | | | | | [NSNumber numberWithDouble:cppb]; warning: converting to boxing syntax requires a cast to something like: [NSNumber numberWithDouble:cppb]; warning: converting to boxing syntax requires casting 'bool' to 'double' This is way better to fully understand the warning. rdar://11705106 llvm-svn: 158783
* [objcmt] When checking whether the subscripting methods are declared useArgyrios Kyrtzidis2012-06-191-4/+4
| | | | | | | | | ObjCInterfaceDec::lookupInstanceMethod to make sure we check categories as well and update related tests. rdar://11695288 llvm-svn: 158697
* [objcmt] When in ARC mode, also convert "[[.. alloc] init]" messages to ↵Argyrios Kyrtzidis2012-06-061-9/+27
| | | | | | | | | | literals, since the change from +1 to +0 will be handled fine by ARC. rdar://11606358 llvm-svn: 158114
* [objcmt] Don't migrate to subscripting syntax if the required methods have notArgyrios Kyrtzidis2012-06-041-11/+40
| | | | | | | | been declared on NSArray/NSDictionary. rdar://11581975 llvm-svn: 157951
OpenPOWER on IntegriCloud