summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite/Core
Commit message (Collapse)AuthorAgeFilesLines
* Make clang's rewrite engine a core featureAlp Toker2014-07-167-2480/+0
| | | | | | | | | | | | | | | 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-091-0/+3
| | | | | | | 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-073-19/+19
| | | | llvm-svn: 208163
* Make RewriteRope less confusing for me. No intended behavior change.Nico Weber2014-04-231-3/+2
| | | | llvm-svn: 207032
* 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-091-1/+1
| | | | llvm-svn: 203389
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-1/+1
| | | | | | 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
* [CMake] Use LINK_LIBS instead of target_link_libraries().NAKAMURA Takumi2014-02-261-2/+1
| | | | llvm-svn: 202238
* [CMake] Get rid of explicit dependencies to include/clang/*.inc and ↵NAKAMURA Takumi2014-02-211-11/+0
| | | | | | | | | | | | | | | | | | | introduce CLANG_TABLEGEN_TARGETS. This does; - clang_tablegen() adds each tblgen'd target to global property CLANG_TABLEGEN_TARGETS as list. - List of targets is added to LLVM_COMMON_DEPENDS. - all clang libraries and targets depend on generated headers. You might wonder this would be regression, but in fact, this is little loss. - Almost all of clang libraries depend on tblgen'd files and clang-tblgen. - clang-tblgen may cause short stall-out but doesn't cause unconditional rebuild. - Each library's dependencies to tblgen'd files might vary along headers' structure. It made hard to track and update *really optimal* dependencies. Each dependency to intrinsics_gen and ClangSACheckers is left as DEPENDS. llvm-svn: 201842
* Use the simpler version of llvm::sys::fs::remove when possible.Rafael Espindola2014-01-101-2/+1
| | | | llvm-svn: 198957
* [CMake] clang/lib: Prune redundant dependencies.NAKAMURA Takumi2013-12-101-1/+0
| | | | llvm-svn: 196864
* [CMake] clang/lib: Satisfy dependencies to add *actually used* libraries on ↵NAKAMURA Takumi2013-12-091-1/+6
| | | | | | | | target_link_libraries() and LLVM_LINK_COMPONENTS. I will prune redundant dependencies later. llvm-svn: 196800
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-1/+1
| | | | llvm-svn: 196510
* Rewriter: Output RewriteRope contents efficientlyAlp Toker2013-12-021-2/+5
| | | | | | | | | This avoids allocation of temporary std::strings for file contents, instead writing chunks directly to the output stream. The old character-based B-tree iterator remains intact for the time being. llvm-svn: 196119
* Use llvm::sys::fs::createUniqueFile.Rafael Espindola2013-07-051-2/+1
| | | | | | | Include a test that clang now produces output files with permissions matching the umask. llvm-svn: 185727
* Port HTMLDiagnostics to PathV2. No intended functionality change.Benjamin Kramer2013-06-121-2/+1
| | | | llvm-svn: 183849
* Added Lexer::getBufferEnd().Alexander Kornienko2013-06-041-1/+1
| | | | | | | | | | | | | | | | | | Summary: There's Lexer::getBufferStart(), and we need getBufferEnd() to access the whole input buffer in clang::format::reformat. We don't want to rely on the fact that the Lexer::BufferEnd always points to '\0', as there can be embedded '\0's as well. Reviewers: jordan_rose Reviewed By: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D916 llvm-svn: 183236
* Use only explicit bool conversion operatorDavid Blaikie2013-05-151-1/+1
| | | | | | | | | | | | | | | | | | | The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. DiagnosticBuilder kept its implicit conversion operator owing to the prevalent use of it in return statements. One bug was found in ExprConstant.cpp involving a comparison of two PointerUnions (PointerUnion did not previously have an operator==, so instead both operands were converted to bool & then compared). A test is included in test/SemaCXX/constant-expression-cxx1y.cpp for the fix (adding operator== to PointerUnion in LLVM). llvm-svn: 181869
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-1/+1
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Remove duplicate includes.Roman Divacky2012-12-211-1/+0
| | | | llvm-svn: 170903
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-043-7/+7
| | | | | | | | | | | | | 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
* Make helper classes anonymous. Make helper functions static instead of ↵Benjamin Kramer2012-12-011-0/+2
| | | | | | | | private members so the anonymous class doesn't leak out. No functionality change. llvm-svn: 169099
* Include pruning and general cleanup.Benjamin Kramer2012-12-011-1/+3
| | | | llvm-svn: 169095
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-231-0/+1
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Remove pointless classof()'s.Sean Silva2012-10-112-7/+0
| | | | | | | Updates to llvm/Support/Casting.h have rendered these classof()'s irrelevant. llvm-svn: 165770
* Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.Ted Kremenek2012-09-017-0/+2488
This is similar to how we divide up the StaticAnalyzer libraries to separate core functionality to what is clearly associated with Frontend actions. llvm-svn: 163050
OpenPOWER on IntegriCloud