f7ccbad5d9949e7ddd1cbef43d482553b811e026 |
|
05-Feb-2012 |
Dylan Noblesmith <nobled@dreamwidth.org> |
Basic: import SmallString<> into clang namespace (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
8fe83e1df954d72c0f4ffc15d20a5222ec151c21 |
|
04-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move a method from IdentifierTable.h out of line and remove the SmallString include. Fix all the transitive include users. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
5f9e272e632e951b1efe824cd16acb4d96077930 |
|
23-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports them into the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
f85e193739c953358c865005855253af4f68a497 |
|
16-Jun-2011 |
John McCall <rjmccall@apple.com> |
Automatic Reference Counting. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
85b1c7ce94904873b1c0b7d08a6bce885d8eb245 |
|
20-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Use S.str() to force a flush. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
750ea6192f7ccd6960bfe87112d934aab7ac579f |
|
20-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Be sure to flush raw_string_ostream objects in the Objective-C rewriter, from Eric Niebler! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
10c8d9e63bcc96d55f788e7c08b72ce626c8aeec |
|
16-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce Rewriter::IncreaseIndentation() which increase indentations for 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
fd183ba0b16718ff05e161bc479678e447df4999 |
|
13-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Collect the options applicable to the Rewriter methods into a RewriterOptions struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
1d015313b27f6002b1c4a74e478ede1622141b4e |
|
11-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixup more objc rwriter bug having to do with rewriting of blocks which have objective-c stuff which need be rewritten as well. // rdar://9254348 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
b65ed34ebf0380c001756eea7a1c1d01e110b557 |
|
07-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Enhance the Rewriter. -Allow removing a line completely if it ends up empty -Provide more control on what should be removed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
ec1b1cc006cef19e0a95d0ea6fbfd37d0d615066 |
|
15-Jul-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Pass StringRefs by value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
0a76aae8c03cb7dd7bdbe683485560afaf695959 |
|
19-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
introduce a new CharSourceRange class, and enhance the diagnostics routines 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) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
0ade808e0ac411baa2dbc1f76ad352b9b6d6d3f8 |
|
16-Apr-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Add a write(raw_ostream&) method to RewriteBuffer. This uses an inefficient implementation today but is the right place if we want to make it faster some day. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
f6ac97b101c8840efa92bf29166077ce4049e293 |
|
16-Mar-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Let SourceManager::getBufferData return StringRef instead of a pair of two const char*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
f715ca12bfc9fddfde75f98a197424434428b821 |
|
16-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Give SourceManager a Diagnostic object with which to report errors, and start simplifying the interfaces in SourceManager that can fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
f9b0a58a103784495309543dce4469e44861b4cc |
|
16-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Add some <cstdio> includes to unbreak the buildbots git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
aea67dbd653a2dd6dd5cc2159279e81e855b2482 |
|
15-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new BufferResult class to act as the return type of SourceManager's getBuffer() (and similar) operations. This abstract can be used to force callers to cope with errors in getBuffer(), such as missing files and changed files. Fix a bunch of callers to use the new interface. Add some very basic checks for file consistency (file size, modification time) into ContentCache::getBuffer(), although these checks don't help much until we've updated the main callers (e.g., SourceManager::getSpelling()). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
88906cddbb1d5b3a868eeeec6cb170befc829c2f |
|
05-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Some clean up of replacement text API no longer needed by my recent changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
7e20ffe322866f6a2e820e054da9bd0f6e9b0af4 |
|
28-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a rewrite bug rewriting nested ivars reference. (Radar 7583971). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
6a12a14a529a79524e17889046c7098b80a73c49 |
|
07-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix typo: rename Rewriter::getRewritenText() -> Rewriter::getRewrittenText(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
1eb4433ac451dc16f4133a88af2d002ac26c58ef |
|
09-Sep-2009 |
Mike Stump <mrs@apple.com> |
Remove tabs, and whitespace cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
d7407dc92c7d19cafce429e7e1cf9819d3fc0b92 |
|
19-Aug-2009 |
Daniel Dunbar <daniel@zuster.org> |
Convert parts of Rewriter to StringRef based API. - Please accept my sincere apologies for the gratuitous elimination of code duplication, manual string length counting, unnecessary strlen calls, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
e4f2142d00fa5fdb580c4e2413da91882d955381 |
|
30-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions. This is simple enough, but then I thought it would be nice to make PrintingPolicy get a LangOptions so that various things can key off "bool" and "C++" independently. This spiraled out of control. There are many fixme's, but I think things are slightly better than they were before. One thing that can be improved: CFG should probably have an ASTContext pointer in it, which would simplify its clients. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
a0978c24829dfd552d38fc3bae2b86e18bb90d49 |
|
18-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR2386: distinguish between insertion and replacements in the delta tree. The issue is roughly a conflict in ReplaceText between two kinds of uses. One, it should be possible to replace a replacement: for example, the ObjC rewriter calls ReplaceStmt for an expression, then replaces the resulting expression with another expression. Two, it should be possible to replace text that already has text inserted before it: for example, the HTML rewriter inserts a bunch of tags at the beginning of the line, then tries to escape the first character on the line. This patch distinguishes the two cases by storing the deltas separately; essentially, replacements and insertions no longer interfere with each other. Another possibility would be to add some sort of flag to ReplaceText, but this seems a bit more intuitive and flexible. There are a few downsides to the current solution: one is that there isn't any way to remove/replace an insertion without touching additional surrounding text; if such an operation turns out to be useful, an additional method or flag can be added. Another is that an insertion and replacing a string of length zero are distinct operations; I'm not sure how to resolve this, or whether it will be confusing in practice. This is relatively sensitive code, so please test and tell me if anything breaks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
2c78b873f4f3823ae859c15674cb3d76c8554113 |
|
15-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Change Lexer::MeasureTokenLength to take a LangOptions reference. This allows it to accurately measure tokens, so that we get: t.cpp:8:13: error: unknown type name 'X' static foo::X P; ~~~~~^ instead of the woefully inferior: t.cpp:8:13: error: unknown type name 'X' static foo::X P; ~~~~ ^ Most of this is just plumbing to push the reference around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
de7aeefc5573d669ed476d7bda7a8940d3bcadb7 |
|
26-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Check in the long promised SourceLocation rewrite. This lays the ground work for implementing #line, and fixes the "out of macro ID's" problem. There is nothing particularly tricky about the code, other than the very performance sensitive SourceManager::getFileID() method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
2b2453a7d8fe732561795431f39ceb2b2a832d84 |
|
17-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
this massive patch introduces a simple new abstraction: it makes "FileID" a concept that is now enforced by the compiler's type checker instead of yet-another-random-unsigned floating around. This is an important distinction from the "FileID" currently tracked by SourceLocation. *That* FileID may refer to the start of a file or to a chunk within it. The new FileID *only* refers to the file (and its #include stack and eventually #line data), it cannot refer to a chunk. FileID is a completely opaque datatype to all clients, only SourceManager is allowed to poke and prod it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
2c3352b5d1f5f4546af2f3051a304d84d57c697e |
|
08-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
Add #include (introduced by dependence on DeclGroup) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
b5cd09a2bf1509167a2e7a46bdd0316812a93335 |
|
04-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
add a new Rewriter::getRewritenText method that returns the text for a range that includes any edits in the range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
a95d3750441ac8ad03e36af8e6e74039c9a3109d |
|
13-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Patch by Csaba Hruska! "Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch covers the AST library, but ignores Analysis lib." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
54bd7cb491cce1fb55ce1baac40cf7002a317166 |
|
28-May-2008 |
Chris Lattner <sabre@nondot.org> |
add an assertion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
9ed7cfd351c5f90df04e5d46680a9b4373b58ee4 |
|
24-May-2008 |
Chris Lattner <sabre@nondot.org> |
fix an inconsistency computing offsets that caused a crash on rewrite-nest.m git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
e5cd857f7e71d5789df25d5046d104b93cf2a71c |
|
14-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
remove ifdefs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
febe719596ee68605944da5f2e03258e18e6df8c |
|
14-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Change the RewriteRope::Chunks data structure from an std::list into a nice shiny B+ Tree variant. This fixes the last of the known algorithmic issues with the rewriter, allowing a significant speedup. For example, -emit-html on Ted's 500K .i file speeds up from 26.8s -> 0.64s in a debug build (41x!) and 5.475s -> 0.132s (41x!) in an optimized build. This code is functional but needs to be cleaned up, ifdefs removed, better commented, and moved to a .cpp file. I plan to do this tomorrow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
77257889f5829144767c8a1d7fc18a929a377b5c |
|
12-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
remove ifdefs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
5c9dc5ac75de8d620311cdc20223998e0293d61f |
|
12-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Do an initial hack at replacing one of the incredibly inefficient (but simple!) datastructures in the rewriter with a more complex but more efficient one. This replaces the Deltas vector with a specialized BTree that makes delta lookups much more efficient. This speeds up -emit-html on a 500K .i file from 157.154 to 27.127 seconds on my machine (5.8x). While this code is functional, it isn't very pretty, I have much refactoring planned for it, and will remove the USE_VECTOR ifdef. Stay tuned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
886c8db545170850f7806f47b5f6120864effd09 |
|
18-Mar-2008 |
Ted Kremenek <kremenek@apple.com> |
Added variant of "InsertText" in the Rewriter to support inserting text both *before* and after a specific location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
88ad97f17790b753e2e113b149d7f164e42fa2ba |
|
18-Mar-2008 |
Ted Kremenek <kremenek@apple.com> |
Bug fix in RewriteBuffer::getMappedOffset: potentially multiple deltas need to be skipped over when AfterInserts == true, as multiple deltas may share the same FileLoc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|
bda0b626e74513950405c27525af87e214e605e2 |
|
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Make a major restructuring of the clang tree: introduce a top-level lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Rewrite/Rewriter.cpp
|