summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite
Commit message (Collapse)AuthorAgeFilesLines
* Remove use of builtin comma operator.Richard Trieu2016-02-181-2/+4
| | | | | | Cleanup for upcoming Clang warning -Wcomma. No functionality change intended. llvm-svn: 261271
* 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) llvm-svn: 260246
* 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 llvm-svn: 258862
* 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 llvm-svn: 250827
* 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 llvm-svn: 250822
* 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. llvm-svn: 243381
* 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. llvm-svn: 243260
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-221-1/+1
| | | | llvm-svn: 240353
* 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. llvm-svn: 240270
* 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. llvm-svn: 234689
* [Rewrite] Make RewriteBuffer accessible on its own, and add a unit test for it.Argyrios Kyrtzidis2015-03-081-1/+1
| | | | llvm-svn: 231588
* Trim some includes. NFC.Hans Wennborg2014-10-291-2/+1
| | | | llvm-svn: 220877
* Delete unused method and clangAST dependency it required.Daniel Jasper2014-10-262-10/+0
| | | | llvm-svn: 220640
* [CMake] clangRewrite: Roll back clangAST in libdeps, due to ↵NAKAMURA Takumi2014-10-241-0/+1
| | | | | | clang::Stmt::printPretty(). llvm-svn: 220549
* Remove code duplication and cut dependency from clangRewrite onDaniel Jasper2014-10-232-22/+0
| | | | | | clangAST. llvm-svn: 220502
* 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. llvm-svn: 217798
* 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. llvm-svn: 213171
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-121-2/+2
| | | | llvm-svn: 210780
* 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. llvm-svn: 210498
* 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. llvm-svn: 210145
* [C++11] Use 'nullptr'.Craig Topper2014-05-077-275/+276
| | | | llvm-svn: 208163
* 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. llvm-svn: 207795
* do not use "1" for line marker for the predefines "file" eitherLubos Lunak2014-05-011-1/+5
| | | | | | Similar to r207764. llvm-svn: 207794
* 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. llvm-svn: 207764
* 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. llvm-svn: 207762
* 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. llvm-svn: 207758
* 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. llvm-svn: 207756
* Make RewriteRope less confusing for me. No intended behavior change.Nico Weber2014-04-231-3/+2
| | | | llvm-svn: 207032
* 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 llvm-svn: 206402
* 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 llvm-svn: 205353
* [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. llvm-svn: 204045
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-156-53/+47
| | | | | | class. llvm-svn: 203999
* [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. llvm-svn: 203958
* [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. llvm-svn: 203947
* [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. llvm-svn: 203932
* [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. llvm-svn: 203930
* [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. llvm-svn: 203922
* [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. llvm-svn: 203863
* [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. llvm-svn: 203842
* [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. llvm-svn: 203840
* [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. llvm-svn: 203839
* Renaming the recently-created (r203830) props() range API to properties() ↵Aaron Ballman2014-03-132-9/+9
| | | | | | for clarity. llvm-svn: 203835
* [C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() ↵Aaron Ballman2014-03-132-33/+15
| | | | | | with iterator_range props(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203830
* Check for LLVM_ON_WIN32 instead of _WIN32.Hans Wennborg2014-03-121-1/+2
| | | | | | This is a follow-up to r203624 to address Anton's comment. llvm-svn: 203668
* [C++11] Replace OwningPtr include with <memory>.Ahmed Charles2014-03-096-6/+6
| | | | llvm-svn: 203389
* [C++11] Replacing RecordDecl iterators field_begin() and field_end() with ↵Aaron Ballman2014-03-082-10/+3
| | | | | | iterator_range fields(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203355
* [C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() ↵Aaron Ballman2014-03-081-2/+1
| | | | | | with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203353
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-073-4/+4
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Replace OwningPtr::isValid() with conversion to bool.Ahmed Charles2014-03-071-1/+1
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203277
* [C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() ↵Aaron Ballman2014-03-072-23/+14
| | | | | | with iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203255
OpenPOWER on IntegriCloud