summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* [cleanup] Re-sort the #include lines using llvm/utils/sort_includes.pyChandler Carruth2015-01-146-6/+6
| | | | | | | No functionality changed, this is a purely mechanical cleanup to ensure the #include order remains consistent across the project. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225975 91177308-0d34-0410-b5e6-96231b3b80d8
* Update clang-format.el to use xml output and patch in the returned chunks.Manuel Klimek2015-01-131-46/+86
| | | | | | | | | This leads to better undo behavior and avoids window content jumping around. Patch by Johann Klähn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225777 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the shifted cursor position to XML output, so it can be used by editor ↵Manuel Klimek2015-01-091-0/+4
| | | | | | integrations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225516 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve clang-format.el.Manuel Klimek2015-01-081-48/+117
| | | | | | | | | | | | - includes header/footer as required by MELPA - correctly handles buffers that are not associated with a file - displays stderr and exit code of clang-format process - customizable via the emacs customization interface and file-/directory- local variables Patch by Johann Klähn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225447 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Include a couple more comments on using xcrun to query the SDK.Ted Kremenek2014-12-311-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225039 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Change ccc-analyzer to mimick behavior on OSX Mavericks/Yosemite ↵Ted Kremenek2014-12-311-0/+20
| | | | | | to automatically infer the SDK location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225038 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format: Make clang-format-diff.py format java files.Daniel Jasper2014-12-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223685 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Eliminated endless loop.Anton Yartsev2014-12-051-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223426 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ArgumentsAdjuster an std::function.Alexander Kornienko2014-12-031-3/+3
| | | | | | | | | | | | Reviewers: klimek Reviewed By: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D6505 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223248 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Indented code within the DisplayHelp sub.Anton Yartsev2014-11-261-84/+84
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222851 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format a recent commit I madeDavid Blaikie2014-11-191-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222317 91177308-0d34-0410-b5e6-96231b3b80d8
* Standardize on StringMap::insert, removing uses of StringMap::GetOrCreateValue.David Blaikie2014-11-192-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222306 91177308-0d34-0410-b5e6-96231b3b80d8
* Make DiagnosticsEngine::takeClient return std::unique_ptr<>Alexander Kornienko2014-11-171-2/+1
| | | | | | | | | | | | | | | | | | Summary: Make DiagnosticsEngine::takeClient return std::unique_ptr<>. Updated callers to store conditional ownership using a pair of pointer and unique_ptr instead of a pointer + bool. Updated code that temporarily registers clients to use the non-owning registration (+ removed extra calls to takeClient). Reviewers: dblaikie Reviewed By: dblaikie Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6294 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222193 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format: Give clang-format-diff.py a -v option.Daniel Jasper2014-11-141-0/+4
| | | | | | | With it, it prints the file being formatted. Apparently people are formatting thousands of files and some progress indication is helpful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221990 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Make sure to visit the body of a CXXForRangeStmt.Argyrios Kyrtzidis2014-11-131-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221881 91177308-0d34-0410-b5e6-96231b3b80d8
* [liblang] Handle CXXForRangeStmt during AST visitation.Argyrios Kyrtzidis2014-11-131-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221874 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] When initializing an ObjC object via the "[[ClassName alloc] ↵Argyrios Kyrtzidis2014-11-101-2/+10
| | | | | | | | | | | | init*]" pattern, report the 'init*' invocation as non-dynamic via clang_Cursor_isDynamicCall. Of course it is dynamic at runtime, but for purposes of indexing we can treat as an invocation to ClassName's init*. Addresses rdar://18916871. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221641 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format: Document that --assume-filename affects the language.Nico Weber2014-11-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221606 91177308-0d34-0410-b5e6-96231b3b80d8
* [c++1z] N4295: fold-expressions.Richard Smith2014-11-081-0/+1
| | | | | | | | | | | | | | | | | This is a new form of expression of the form: (expr op ... op expr) where one of the exprs is a parameter pack. It expands into (expr1 op (expr2onwards op ... op expr)) (and likewise if the pack is on the right). The non-pack operand can be omitted; in that case, an empty pack gives a fallback value or an error, depending on the operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221573 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix style.Michael J. Spencer2014-11-071-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221546 91177308-0d34-0410-b5e6-96231b3b80d8
* Support LLVM_BUILD_STATIC.Rafael Espindola2014-11-052-5/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221346 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format: Make it possible to (require 'clang-format)Justin Bogner2014-11-051-0/+2
| | | | | | | This makes the emacs integration ``provide`` a clang-format feature, so that a .emacs can ``require`` it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221330 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format: Fix vim integration if g:clang_format_binary doesn't existDaniel Jasper2014-11-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221254 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tidy] Move -extra-arg handling to CommonOptionsProviderAlexander Kornienko2014-11-041-61/+7
| | | | | | | | | | | | | | | | | | Summary: Handle -extra-arg and -extra-arg-before options in the CommonOptionsProvider so they can be used in all clang tools. Adjust arguments in a CompilationDatabase wrapper instead of adding ArgumentsAdjuster to the tool. Reviewers: djasper, klimek Reviewed By: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D6073 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221248 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-api-change] Use findProgramByName.Michael J. Spencer2014-11-041-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221222 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format: permit setting the path to clang in vimrcSaleem Abdulrasool2014-11-021-0/+3
| | | | | | | | | If g:clang_format_path is set in the vimrc, that path will take precedence over the hard coded path (which is reliant on the PATH environment variable). This provides an easy mechanism for switching the selected clang-format binary during development. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221108 91177308-0d34-0410-b5e6-96231b3b80d8
* docs: remove double carriage-returnSaleem Abdulrasool2014-11-021-1/+1
| | | | | | | The double carriage return would silence a warning due to a missing .clang-format. Permit the error to bubble through. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221107 91177308-0d34-0410-b5e6-96231b3b80d8
* [autoconf] Add clangToolingCore.a to Makefile(s) for static build w/o ↵NAKAMURA Takumi2014-10-302-0/+2
| | | | | | libclang.dll. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220904 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Prune redundant libdeps.NAKAMURA Takumi2014-10-302-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220893 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add dependencies on clangToolingCore.NAKAMURA Takumi2014-10-301-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220890 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format: Cut more clangAST dependencies.Daniel Jasper2014-10-291-0/+1
| | | | | | Hopefully fixing windows builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220878 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor libTooling to reduce required dependencies.Daniel Jasper2014-10-293-5/+2
| | | | | | | | | | This moves classes for storing and applying replacements to separate files. These classes specifically are used by clang-format which doesn't have any other dependencies on clangAST. Thereby, the size of clang-format's binary can be cut roughly in half and its build time sped up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220867 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C. revert patch for rdar://17554063.Fariborz Jahanian2014-10-281-6/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220812 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the initial TypoExpr AST node for delayed typo correction.Kaelyn Takata2014-10-271-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220692 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format: improve vim integration docsSaleem Abdulrasool2014-10-271-2/+2
| | | | | | | | | | Improve the documentation for vim integration of clang-format. Prefer the use of <c-o> to do the normal mode command execution to avoid side-effects of the escape and re-insertion (cursor movement). Tweak the macros to use a double return to avoid having to manually return control to the editor from the subprocess. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220685 91177308-0d34-0410-b5e6-96231b3b80d8
* Add frontend support for __vectorcallReid Kleckner2014-10-241-0/+1
| | | | | | | | | | | | | Wire it through everywhere we have support for fastcall, essentially. This allows us to parse the MSVC "14" CTP headers, but we will miscompile them because LLVM doesn't support __vectorcall yet. Reviewed By: Aaron Ballman Differential Revision: http://reviews.llvm.org/D5808 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220573 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Include driver diagnostics when we --serialize-diagnosticsJustin Bogner2014-10-231-1/+15
| | | | | | | | | | | | | | | Currently, when --serialize-diagnostics is passed this only includes the diagnostics from clang -cc1, and driver diagnostics are dropped. This causes issues for tools that use the serialized diagnostics, since stderr is lost and these diagnostics aren't seen at all. We handle this by merging the diagnostics from the CC1 process and the driver diagnostics into a single file when the driver invokes CC1. Fixes rdar://problem/10585062 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220525 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor implementation of 'exclude header'.Richard Smith2014-10-231-5/+1
| | | | | | | | | | This was not a real header role, and was never exposed to clients of ModuleMap. Remove the enumeration value for it and track it as marking the header as 'known' rather than creating an extra KnownHeader entry that *every single* client ignores. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220460 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Codegen for 'private' clause in 'parallel' directive.Alexey Bataev2014-10-211-1/+5
| | | | | | | | This patch generates some helper variables which used as a private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by default (with the default constructor, if any). In outlined function references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables and implicit barier is set by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D4752 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220262 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Make FailingCommand mandatory for generateCompilationDiagnosticsJustin Bogner2014-10-201-3/+7
| | | | | | | | | | | | | We currently use a null FailingCommand when generating crash reports as an indication that the cause is FORCE_CLANG_DIAGNOSTICS_CRASH, the environment variable that exists to test crash dumps. This means that our tests don't actually cover real crashes at all, and adds a more complicated code path that's only used in the tests. Instead, we can have the driver synthesize that every command failed and just call generateCompilationDiagnostics normally. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220234 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: support detecting driver mode when clang has a version suffix ↵Hans Wennborg2014-10-171-76/+81
| | | | | | | | | | | | | | without dash (PR21094) Clang would previously not get into C++ mode when invoked as 'clang++3.6' (though clang++-3.6 would work). I found the previous loop logic in this function confusing; hopefully this makes it a little clearer. Differential Revision: http://reviews.llvm.org/D5833 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220052 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively fix GCC 4.7 build after r219938Hans Wennborg2014-10-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219941 91177308-0d34-0410-b5e6-96231b3b80d8
* Use iterators and algorithms to possibly make this code a bit tidierDavid Blaikie2014-10-161-16/+12
| | | | | | | | | | | | | (also, the code executed once the element was found was split half inside the loop and half after it - now put it all together after the find operation) I'm a bit concerned that this code is rather untested (commenting out this whole function and running check-clang doesn't fail any tests)... And I wish I had polymorphic lambdas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219938 91177308-0d34-0410-b5e6-96231b3b80d8
* Use array_lengthof; NFC.Hans Wennborg2014-10-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219935 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm_unreachable after switch to avoid warnings about a missingKaelyn Takata2014-10-151-0/+1
| | | | | | | | return. Forgot to add this in r219818. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219820 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop unneccessary default case from switch introduced in r219809Kaelyn Takata2014-10-151-2/+0
| | | | | | | | This silences: ../tools/clang/tools/libclang/CIndex.cpp:6451:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219818 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Perl scripts are run differently from makefiles. Sometimes ↵Anton Yartsev2014-10-152-0/+2
| | | | | | additional utilities are involved, e.g. 'env' utility that present in MSYS but is missing in MinGW. The patch unifies launch of "c++-analyzer" and "ccc-analyzer". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219812 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add function to retrieve storage class in libclang.Argyrios Kyrtzidis2014-10-152-0/+36
| | | | | | | Patch by guibufolo! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219809 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for llvm api change.Rafael Espindola2014-10-151-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219800 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Handle 'mingw32-make' in the same way as 'make' and 'gmake'.Anton Yartsev2014-10-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219794 91177308-0d34-0410-b5e6-96231b3b80d8