summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FixItRewriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Break Frontend's dependency on Rewrite, Checker and CodeGen in shared ↵Daniel Dunbar2010-06-151-167/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Switch this to new API.Nick Lewycky2010-04-241-1/+1
| | | | llvm-svn: 102280
* Teach clang -fixit to modify files in-place, or -fixit=suffix to create newNick Lewycky2010-04-241-48/+16
| | | | | | files with the additional suffix in the middle. llvm-svn: 102230
* Add a write(raw_ostream&) method to RewriteBuffer. This uses an inefficientNick Lewycky2010-04-161-1/+1
| | | | | | | implementation today but is the right place if we want to make it faster some day. llvm-svn: 101521
* Teach -fixit to modify all of its inputs instead of just the main file, unlessNick Lewycky2010-04-151-30/+31
| | | | | | -fixit-at specified a particular fixit to fix, or the -o flag was used. llvm-svn: 101359
* Reinstate my CodeModificationHint -> FixItHint renaming patch, withoutDouglas Gregor2010-03-311-7/+7
| | | | | | the C-only "optimization". llvm-svn: 100022
* Revert r100008, which inexplicably breaks the clang-i686-darwin10 builderDouglas Gregor2010-03-311-7/+7
| | | | llvm-svn: 100018
* Rename CodeModificationHint to FixItHint, since we've been using theDouglas Gregor2010-03-311-7/+7
| | | | | | | term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. llvm-svn: 100008
* When suggesting a typo correction for an @implementation without aDouglas Gregor2010-01-061-0/+3
| | | | | | | | | | corresponding @interface, provide a note showing which interface we're referring to. This note has the fix-it hint on it. Also, don't automatically apply fix-it hints for notes. They're meant to express fix-its that would change semantics. llvm-svn: 92870
* Kill a few more random stderr uses.Daniel Dunbar2009-12-031-1/+1
| | | | llvm-svn: 90441
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-11/+11
| | | | llvm-svn: 81346
* Update clang for raw_fd_ostream no longer requiring F_Force.Dan Gohman2009-08-251-4/+2
| | | | llvm-svn: 79991
* Fix build of clang with gcc-4.4: #include <cstdio> was missing.Torok Edwin2009-08-241-0/+2
| | | | llvm-svn: 79916
* API changes to match llvm ToT.Chris Lattner2009-08-231-1/+1
| | | | llvm-svn: 79868
* Replace cerr with errs().Benjamin Kramer2009-08-231-2/+1
| | | | llvm-svn: 79854
* adjust for raw_fd_ostream api change.Chris Lattner2009-08-231-10/+6
| | | | llvm-svn: 79809
* Remove now unnecessary helper methods.Daniel Dunbar2009-08-191-1/+1
| | | | llvm-svn: 79460
* Convert parts of Rewriter to StringRef based API.Daniel Dunbar2009-08-191-2/+1
| | | | | | | - Please accept my sincere apologies for the gratuitous elimination of code duplication, manual string length counting, unnecessary strlen calls, etc. llvm-svn: 79448
* Update for raw_fd_ostream API changes. raw_fd_ostream now has aDan Gohman2009-07-151-0/+2
| | | | | | | Force flag to control whether the case of opening an existing file is considered an error. llvm-svn: 75802
* Change Lexer::MeasureTokenLength to take a LangOptions reference.Chris Lattner2009-04-141-2/+3
| | | | | | | | | | | | | | | | | | 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. llvm-svn: 69099
* Add a new command-line option "-fixit-at=file:line:column" that onlyDouglas Gregor2009-04-021-2/+37
| | | | | | | applies fix-its to error messages that occur at that specific location in the program. llvm-svn: 68342
* Provide FIX-IT notes to describe what fix-it is doing behind theDouglas Gregor2009-04-021-31/+39
| | | | | | | scenes, using the underlying diagnostic client to format the messages. llvm-svn: 68324
* Some cleanups to the fix-it rewriter. Thanks, ChrisDouglas Gregor2009-04-021-29/+43
| | | | llvm-svn: 68322
* Clean up -fixit output slightlyDouglas Gregor2009-04-021-1/+2
| | | | llvm-svn: 68278
* Introduce a "-fixit" mode to clang-cc that applies code-modification hints.Douglas Gregor2009-04-021-0/+140
llvm-svn: 68268
OpenPOWER on IntegriCloud