summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [analyzer] Change ccc-analyzer to accept both -isystem <path> and -isystem<path>Ted Kremenek2015-02-031-2/+1
| | | | | | Patch by Thomas Hauth! llvm-svn: 227946
* This reverts commit r227432, r227438 and r227448.Rafael Espindola2015-01-293-116/+21
| | | | | | | | | | | | | | | | | | | | | | | It should bring the bots back. Original messagses: r227448: Remove unnecessary default. r227438: Fix Index/print-type.cpp test following r227432. r227432: libclang: Add three functions useful for dealing with anonymous fields: clang_Cursor_getOffsetOfField clang_Cursor_isAnonymous clang_Type_visitFields Python: Add corresponding methods for dealing with anonymous fields. Patch by Loïc Jaquemet llvm-svn: 227472
* Reverting r227453, which adds back the fuzzer library. Now excluding the ↵Aaron Ballman2015-01-293-1/+45
| | | | | | clang-format fuzzer functionality based on LLVM_USE_SANITIZE_COVERAGE being set or unset. llvm-svn: 227465
* Temporarily reverting the fuzzer library as it causes too many build issues ↵Aaron Ballman2015-01-293-43/+1
| | | | | | for MSVC users. This reverts: 227354 llvm-svn: 227453
* Remove unnecessary default.Francois Pichet2015-01-291-1/+0
| | | | llvm-svn: 227448
* libclang: Add three functions useful for dealing with anonymous fields:Francois Pichet2015-01-293-21/+117
| | | | | | | | | | | clang_Cursor_getOffsetOfField clang_Cursor_isAnonymous clang_Type_visitFields Python: Add corresponding methods for dealing with anonymous fields. Patch by Loïc Jaquemet llvm-svn: 227432
* Remove support for pnaclcall attributeDerek Schuff2015-01-281-1/+0
| | | | | | | | | | | | | | | | | | Summary: It was used for interoperability with PNaCl's calling conventions, but it's no longer needed. Also Remove NaCl*ABIInfo which just existed to delegate to either the portable or native ABIInfo, and remove checkCallingConvention which was now a no-op override. Reviewers: jvoung Subscribers: jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D7206 llvm-svn: 227362
* Add clang-format-fuzzer targetKostya Serebryany2015-01-283-1/+43
| | | | | | | | | | | | | | | | | | | | | Summary: This adds clang-format-fuzzer binary, which depends on the Fuzzer lib, see http://reviews.llvm.org/D7184 This fuzer has found ~15 bugs so far, and I hope to set up a bot for it. Test Plan: run on a bot. Reviewers: samsonov, djasper Reviewed By: djasper Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D7202 llvm-svn: 227354
* Improves overload completion result chunks.Francisco Lopes da Silva2015-01-281-1/+2
| | | | | | | | | | | | | | | | | | | | | The code building the code completion string for overloads was providing less detail compared to the one building completion strings for function declarations. There was no information about optionals and no information about what's a parameter and what's a function identifier, everything besides ResultType, CurrentParameter and special characters was classified as Text. This makes code completion strings for overload candidates to follow a pattern very similar, but not identical, to the one in use for function declarations: - return type chunk: ResultType - function identifier chunk: Text - parameter chunks: Placeholder - optional parameter chunks: Optional - current parameter chunk: CurrentParameter llvm-svn: 227309
* Replace size() calls on containers with empty() calls where appropriate. NFCAlexander Kornienko2015-01-231-1/+1
| | | | | | | | http://reviews.llvm.org/D7090 Patch by Gábor Horváth! llvm-svn: 226914
* Adopt new cl::HideUnrelatedOptions API added r226729.Chris Bieneman2015-01-211-9/+1
| | | | | | | | | | | | Summary: cl::HideUnrelatedOptions allows tools to hide all options not part of a specific OptionCategory. This is the common use case for cl::getRegisteredOptions, which should be deprecated in the future because it exposes implementation details of command line parsing. Reviewers: dexonsmith Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D7109 llvm-svn: 226741
* Initial support for C++ parameter completionFrancisco Lopes da Silva2015-01-212-1/+3
| | | | | | | | | | | | | | | | | | | | The improved completion in call context now works with: - Functions. - Member functions. - Constructors. - New expressions. - Function call expressions. - Template variants of the previous. There are still rough edges to be fixed: - Provide support for optional parameters. (fix known) - Provide support for member initializers. (fix known) - Provide support for variadic template functions. (fix unknown) - Others? llvm-svn: 226670
* Link libclang with dl if available.Rafael Espindola2015-01-201-0/+5
| | | | | | This is in preparation for changing the link to use -Wl,-z,defs. llvm-svn: 226609
* Re-apply "r226548 - Introduce SPIR calling conventions" reverted in r226558.Alexander Kornienko2015-01-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | The test was fixed after a discussion with the revision author: the check pattern was made more flexible as the "%call" part is not what we actually want to check strictly there. The original patch description: === Introduce SPIR calling conventions. This implements Section 3.7 from the SPIR 1.2 spec: SPIR kernels should use "spir_kernel" calling convention. Non-kernel functions use "spir_func" calling convention. All other calling conventions are disallowed. The patch works only for OpenCL source. Any other uses will need to ensure that kernels are assigned the spir_kernel calling convention correctly. === llvm-svn: 226561
* Reverting r226548 as one of the tests fails in some configurations.Alexander Kornienko2015-01-201-3/+0
| | | | | | | | | | | | | | | | | | | | | | Here's the fail log from our internal setup: === .../tools/clang/clang -cc1 -internal-isystem .../tools/clang/staging/include -nostdsysteminc .../tools/clang/test/CodeGenOpenCL/spir-calling-conv.cl -triple spir-unknown-unknown -emit-llvm -o - FileCheck .../tools/clang/test/CodeGenOpenCL/spir-calling-conv.cl .../tools/clang/test/CodeGenOpenCL/spir-calling-conv.cl:11:12: error: expected string not found in input // CHECK: %call = tail call spir_func i32 @get_dummy_id(i32 0) ^ <stdin>:6:52: note: scanning from here define spir_kernel void @foo(i32 addrspace(1)* %A) #0 { ^ <stdin>:7:2: note: possible intended match here %1 = tail call spir_func i32 @get_dummy_id(i32 0) #2 ^ === Here's a failure on a public CI server: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/1183/ llvm-svn: 226558
* Introduce SPIR calling conventions.Sameer Sahasrabuddhe2015-01-201-0/+3
| | | | | | | | | | | | | | This implements Section 3.7 from the SPIR 1.2 spec: SPIR kernels should use "spir_kernel" calling convention. Non-kernel functions use "spir_func" calling convention. All other calling conventions are disallowed. The patch works only for OpenCL source. Any other uses will need to ensure that kernels are assigned the spir_kernel calling convention correctly. llvm-svn: 226548
* Make clang-format work in emacs buffers with unicode characters.Manuel Klimek2015-01-191-11/+16
| | | | | | | | | | Emacs functions by default use character positions; convert characters to offsets when handing parameters to clang-format and convert byte offsets we get from clang-format back to character positions. Reworked the code a bit so the 0-based to 1-based offset calculations are done in the same place where we do the multi-byte to offset mapping. llvm-svn: 226445
* [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. llvm-svn: 225975
* 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. llvm-svn: 225777
* Add the shifted cursor position to XML output, so it can be used by editor ↵Manuel Klimek2015-01-091-0/+4
| | | | | | integrations. llvm-svn: 225516
* 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. llvm-svn: 225447
* [analyzer] Include a couple more comments on using xcrun to query the SDK.Ted Kremenek2014-12-311-0/+4
| | | | llvm-svn: 225039
* [analyzer] Change ccc-analyzer to mimick behavior on OSX Mavericks/Yosemite ↵Ted Kremenek2014-12-311-0/+20
| | | | | | to automatically infer the SDK location. llvm-svn: 225038
* clang-format: Make clang-format-diff.py format java files.Daniel Jasper2014-12-081-1/+1
| | | | llvm-svn: 223685
* [analyzer] Eliminated endless loop.Anton Yartsev2014-12-051-0/+1
| | | | llvm-svn: 223426
* 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 llvm-svn: 223248
* [analyzer] Indented code within the DisplayHelp sub.Anton Yartsev2014-11-261-84/+84
| | | | llvm-svn: 222851
* clang-format a recent commit I madeDavid Blaikie2014-11-191-4/+3
| | | | llvm-svn: 222317
* Standardize on StringMap::insert, removing uses of StringMap::GetOrCreateValue.David Blaikie2014-11-192-3/+3
| | | | llvm-svn: 222306
* 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 llvm-svn: 222193
* 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. llvm-svn: 221990
* [libclang] Make sure to visit the body of a CXXForRangeStmt.Argyrios Kyrtzidis2014-11-131-1/+2
| | | | llvm-svn: 221881
* [liblang] Handle CXXForRangeStmt during AST visitation.Argyrios Kyrtzidis2014-11-131-0/+6
| | | | llvm-svn: 221874
* [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. llvm-svn: 221641
* clang-format: Document that --assume-filename affects the language.Nico Weber2014-11-101-1/+1
| | | | llvm-svn: 221606
* [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. llvm-svn: 221573
* Fix style.Michael J. Spencer2014-11-071-5/+3
| | | | llvm-svn: 221546
* Support LLVM_BUILD_STATIC.Rafael Espindola2014-11-052-5/+17
| | | | llvm-svn: 221346
* 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. llvm-svn: 221330
* clang-format: Fix vim integration if g:clang_format_binary doesn't existDaniel Jasper2014-11-041-1/+1
| | | | llvm-svn: 221254
* [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 llvm-svn: 221248
* [llvm-api-change] Use findProgramByName.Michael J. Spencer2014-11-041-3/+3
| | | | llvm-svn: 221222
* 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. llvm-svn: 221108
* 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. llvm-svn: 221107
* [autoconf] Add clangToolingCore.a to Makefile(s) for static build w/o ↵NAKAMURA Takumi2014-10-302-0/+2
| | | | | | libclang.dll. llvm-svn: 220904
* [CMake] Prune redundant libdeps.NAKAMURA Takumi2014-10-302-2/+0
| | | | llvm-svn: 220893
* [CMake] Add dependencies on clangToolingCore.NAKAMURA Takumi2014-10-301-0/+1
| | | | llvm-svn: 220890
* clang-format: Cut more clangAST dependencies.Daniel Jasper2014-10-291-0/+1
| | | | | | Hopefully fixing windows builds. llvm-svn: 220878
* 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. llvm-svn: 220867
* Objective-C. revert patch for rdar://17554063.Fariborz Jahanian2014-10-281-6/+0
| | | | llvm-svn: 220812
OpenPOWER on IntegriCloud