summaryrefslogtreecommitdiffstats
path: root/lib/Rewrite
Commit message (Collapse)AuthorAgeFilesLines
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-031-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304647 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Re-apply r283092, attempt no.4, chunk no.4 (last)Artem Dergachev2016-10-071-2/+7
| | | | | | | | The problem that caused the msvc crash has been indentified and fixed in the previous commit. This patch contains the rest of r283092. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283584 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[analyzer] Try to re-apply r283092 "Extend bug reports with extra notes"Artem Dergachev2016-10-071-7/+2
| | | | | | | Vector of smart pointers wasn't the thing that caused msvc crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283537 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Try to re-apply r283092 "Extend bug reports with extra notes"Artem Dergachev2016-10-071-2/+7
| | | | | | | | Replace SmallVector<IntrusiveRefCntPtr> with a vector of plain pointers. Would insignificantly increase memory usage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283536 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[analyzer] Extend bug reports with extra notes" to fix Windows bot.Vitaly Buka2016-10-041-7/+2
| | | | | | This reverts commit r283092. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283180 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Extend bug reports with extra notesArtem Dergachev2016-10-031-2/+7
| | | | | | | | | | | | | | | | | | | | | These diagnostics are separate from the path-sensitive engine's path notes, and can be added manually on top of path-sensitive or path-insensitive reports. The new note diagnostics would appear as note:-diagnostic on console and as blue bubbles in scan-build. In plist files they currently do not appear, because format needs to be discussed with plist file users. The analyzer option "-analyzer-config notes-as-events=true" would convert notes to normal path notes, and put them at the beginning of the path. This is a temporary hack to show the new notes in plist files. A few checkers would be updated in subsequent commits, including tests for this new feature. Differential Revision: https://reviews.llvm.org/D24278 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283092 91177308-0d34-0410-b5e6-96231b3b80d8
* Use StringRef for MemoryBuffer identifier API (NFC)Mehdi Amini2016-10-011-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283043 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Fix HTMLRewriter style sheets to support non-webkit browsers.Artem Dergachev2016-09-151-0/+4
| | | | | | | | | | This fixes rounded corners and shadows of analyzer diagnostic pieces in browsers such as Firefox. Differential Revision: https://reviews.llvm.org/D23272 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281625 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove use of builtin comma operator.Richard Trieu2016-02-181-2/+4
| | | | | | | Cleanup for upcoming Clang warning -Wcomma. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261271 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify EnterTokenStream API to make it more robust for memory managementDavid Blaikie2016-02-091-1/+1
| | | | | | | | | | | | | | | While this won't help fix things like the bug that r260219 addressed, it seems like good tidy up to have anyway. (it might be nice if "makeArrayRef" always produced a MutableArrayRef & let it decay to an ArrayRef when needed - then I'd use that for the MutableArrayRefs in this patch) If we had std::dynarray I'd use that instead of unique_ptr+size_t, ideally (but then it'd have to be threaded down through the Preprocessor all the way - no idea how painful that would be) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260246 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove autoconf supportChris Bieneman2016-01-261-18/+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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258862 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll-back r250822.Angel Garcia Gomez2015-10-201-1/+2
| | | | | | | | | | Summary: It breaks the build for the ASTMatchers Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13893 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250827 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply modernize-use-default to clang.Angel Garcia Gomez2015-10-201-2/+1
| | | | | | | | | | | | Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: bkramer, klimek Subscribers: klimek, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13890 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250822 91177308-0d34-0410-b5e6-96231b3b80d8
* Make local function isWhitespaceExceptNL static instead of in anonymous ↵Yaron Keren2015-07-281-3/+1
| | | | | | | | | | namespace per the coding standard. Thanks Craig Tooper for noticing this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243381 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename highly-confusing isWhitespace that returns false on \n toYaron Keren2015-07-271-17/+13
| | | | | | | | | | | isWhitespaceExceptNL. If that's wasn't bad enough, we have an identically named function in Basic/CharInfo.h. While at it, remove unnecessary includes, .str() calls and #ifdef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243260 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240353 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-221-1/+1
| | | | | | | | | | | | | | The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240270 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove empty non-virtual destructors or mark them =default when non-publicBenjamin Kramer2015-04-111-2/+2
| | | | | | These add no value but can make a class non-trivially copyable. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234689 91177308-0d34-0410-b5e6-96231b3b80d8
* [Rewrite] Make RewriteBuffer accessible on its own, and add a unit test for it.Argyrios Kyrtzidis2015-03-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231588 91177308-0d34-0410-b5e6-96231b3b80d8
* Trim some includes. NFC.Hans Wennborg2014-10-291-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220877 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete unused method and clangAST dependency it required.Daniel Jasper2014-10-262-10/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220640 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] clangRewrite: Roll back clangAST in libdeps, due to ↵NAKAMURA Takumi2014-10-241-0/+1
| | | | | | clang::Stmt::printPretty(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220549 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove code duplication and cut dependency from clangRewrite onDaniel Jasper2014-10-232-22/+0
| | | | | | clangAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220502 91177308-0d34-0410-b5e6-96231b3b80d8
* Use intrusive refcounted pointers to manage RopeRefCountString lifetime.Benjamin Kramer2014-09-151-9/+5
| | | | | | | | | std::shared_ptr<char []> would be even nicer, but shared_ptr doesn't work with arrays :( No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217798 91177308-0d34-0410-b5e6-96231b3b80d8
* Make clang's rewrite engine a core featureAlp Toker2014-07-1619-15072/+23
| | | | | | | | | | | | | | | The rewrite facility's footprint is small so it's not worth going to these lengths to support disabling at configure time, particularly since key compiler features now depend on it. Meanwhile the Objective-C rewriters have been moved under the ENABLE_CLANG_ARCMT umbrella for now as they're comparatively heavy and still potentially worth excluding from lightweight builds. Tests are now passing with any combination of feature flags. The flags historically haven't been tested by LLVM's build servers so caveat emptor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213171 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-121-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210780 91177308-0d34-0410-b5e6-96231b3b80d8
* Removing an "if (this == nullptr)" check from two print methods. The conditionRichard Trieu2014-06-093-0/+8
| | | | | | | | will never be true in a well-defined context. The checking for null pointers has been moved into the caller logic so it does not rely on undefined behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210498 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the last remaining llvm/Config/config.h includesAlp Toker2014-06-041-1/+1
| | | | | | | | | | | | This corrects long-standing misuses of LLVM's internal config.h. In most cases the public llvm-config.h header was intended and we can now remove the old hacks thanks to LLVM r210144. The config.h header is private, won't be installed and should no longer be included by clang or other modules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210145 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Use 'nullptr'.Craig Topper2014-05-077-275/+276
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208163 91177308-0d34-0410-b5e6-96231b3b80d8
* write a line marker right before adding included fileLubos Lunak2014-05-011-0/+2
| | | | | | | | | | Enclosing the original #include directive inside #if 0 adds lines, so warning/errors messages would have the line number off in "In file included from <file>:<line>:", so add line marker to fix this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207795 91177308-0d34-0410-b5e6-96231b3b80d8
* do not use "1" for line marker for the predefines "file" eitherLubos Lunak2014-05-011-1/+5
| | | | | | | | Similar to r207764. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207794 91177308-0d34-0410-b5e6-96231b3b80d8
* do not use "1" for line marker for the main fileLubos Lunak2014-05-011-2/+5
| | | | | | | | | | | | "1" means entering a new file (from a different one), but the main file is not included from anything (and this would e.g. confuse -Wunused-macros to not report unused macros in the main file, see pr15610, or also see pr18948). The line marker is still useful e.g. if the resulting file is renamed or used via a pipe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207764 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r207756Lubos Lunak2014-05-011-1/+0
| | | | | | | | | | There's nothing wrong with the change itself, but test/Frontend/rewrite-includes-messages.c fails without another not-yet-committed fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207762 91177308-0d34-0410-b5e6-96231b3b80d8
* do not warn about unknown pragmas in modes that do not handle them (pr9537)Lubos Lunak2014-05-011-7/+1
| | | | | | | | | And refactor to have just one place in code that sets up the empty pragma handlers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207758 91177308-0d34-0410-b5e6-96231b3b80d8
* write a line marker right before adding included fileLubos Lunak2014-05-011-0/+1
| | | | | | | | | | Enclosing the original #include directive inside #if 0 adds lines, so warning/errors messages would have the line number off in "In file included from <file>:<line>:", so add line marker to fix this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207756 91177308-0d34-0410-b5e6-96231b3b80d8
* Make RewriteRope less confusing for me. No intended behavior change.Nico Weber2014-04-231-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207032 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C rewriter. Use _WIN64 instead of __LLP64__Fariborz Jahanian2014-04-161-1/+1
| | | | | | | | to conditinalize on 64bit length in a generated meta-data. // rdar://16489050 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206402 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C modern translator. Fix declaration ofFariborz Jahanian2014-04-011-0/+4
| | | | | | | | __NSConstantStringImpl's length field to accomodate window's 64bit LLP64 mode. // rdar://16489050 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205353 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing FunctionProtoType iterators param_type_begin() and ↵Aaron Ballman2014-03-172-44/+24
| | | | | | param_type_end() with iterator_range param_types(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204045 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-156-53/+47
| | | | | | class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203999 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with ↵Aaron Ballman2014-03-142-10/+8
| | | | | | iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203958 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing DeclStmt iterators decl_begin() and decl_end() with ↵Aaron Ballman2014-03-141-3/+1
| | | | | | iterator_range decls(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203947 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCImplementationDecl iterators ivar_begin() and ↵Aaron Ballman2014-03-141-4/+2
| | | | | | ivar_end() with iterator_range ivars(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203932 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCCategoryDecl iterators propimpl_begin() and ↵Aaron Ballman2014-03-142-24/+8
| | | | | | propimpl_end() with iterator_range property_impls(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203930 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-141-8/+3
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203922 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-131-8/+3
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203863 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCInterfaceDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-131-2/+2
| | | | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. Drive-by fixing some incorrect types where a for loop would be improperly using ObjCInterfaceDecl::protocol_iterator. No functional changes in these cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203842 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCContainerDecl iterators classmeth_begin() and ↵Aaron Ballman2014-03-132-46/+18
| | | | | | classmeth_end() with iterator_range class_methods(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203840 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCContainerDecl iterators instmeth_begin() and ↵Aaron Ballman2014-03-132-46/+19
| | | | | | instmeth_end() with iterator_range instance_methods(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203839 91177308-0d34-0410-b5e6-96231b3b80d8
* Renaming the recently-created (r203830) props() range API to properties() ↵Aaron Ballman2014-03-132-9/+9
| | | | | | for clarity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203835 91177308-0d34-0410-b5e6-96231b3b80d8