summaryrefslogtreecommitdiffstats
path: root/clang/lib/Edit/EditedSource.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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] 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
* [C++11] Use 'nullptr'.Craig Topper2014-05-091-1/+1
| | | | llvm-svn: 208392
* 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
* [objcmt] Fix a mishandled conversion to objc directory literal.Argyrios Kyrtzidis2013-04-061-0/+2
| | | | | | rdar://13181413 llvm-svn: 178942
* 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
* 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-041-1/+1
| | | | | | | | | | | | | 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
* [objcmt] When rewriting to array/dictionary literals, add an explicitArgyrios Kyrtzidis2012-05-141-1/+4
| | | | | | | | cast to 'id' for any argument that requires it. Part of rdar://11438360. llvm-svn: 156782
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-061-0/+329
the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. llvm-svn: 152141
OpenPOWER on IntegriCloud