summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra
Commit message (Collapse)AuthorAgeFilesLines
...
* Moved SymbolOrigin into its own header and implementation fileDmitri Gribenko2019-02-2812-36/+85
| | | | | | | | | | | | Reviewers: ioeric Subscribers: mgorny, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58773 llvm-svn: 355086
* Moved SymbolLocation into its own header and implementation fileDmitri Gribenko2019-02-2811-91/+136
| | | | | | | | | | | | Reviewers: ioeric Subscribers: mgorny, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58768 llvm-svn: 355082
* Moved DenseMap support for SymbolID into SymbolID.hDmitri Gribenko2019-02-282-25/+22
| | | | llvm-svn: 355081
* [clang-tidy] misc-string-integer-assignment: fix false positiveClement Courbet2019-02-282-4/+9
| | | | | | | | | | | | | | | | | | | | Summary: using CodePoint = uint32_t; CodePoint cp; basic_string<CodePoint> s; s += cp; See PR27723. Reviewers: xazax.hun, alexfh Subscribers: rnkovacs, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58606 llvm-svn: 355076
* [clang-tidy] Add the abseil-time-subtraction checkHyrum Wright2019-02-2711-0/+448
| | | | | | Differential Revision: https://reviews.llvm.org/D58137 llvm-svn: 355024
* Added documentation for clangd v9+ featuresDmitri Gribenko2019-02-271-0/+34
| | | | | | | | | | | | Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58717 llvm-svn: 354994
* Added more detailed documentation for clangdDmitri Gribenko2019-02-2724-172/+848
| | | | | | | | | | | | | | | | Summary: The text was written mostly by Sam McCall, screenshots are mostly made by me. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58710 llvm-svn: 354992
* [clangd] Improve global code completion when scope specifier is unresolved.Eric Liu2019-02-272-11/+42
| | | | | | | | | | | | | | | | | | | | | | | Summary: Suppose `clangd::` is unresolved in the following example. Currently, we simply use "clangd::" as the query scope. We can do better by combining with accessible scopes in the context. The query scopes can be `{clangd::, clang::clangd::}`. ``` namespace clang { clangd::^ } ``` Reviewers: ilya-biryukov, sammccall, hokein, kadircet Reviewed By: kadircet Subscribers: MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58448 llvm-svn: 354963
* [clangd] Set thread priority on WindowsIlya Biryukov2019-02-271-0/+7
| | | | | | | | | | | | | | Reviewers: kadircet, gribozavr Reviewed By: kadircet, gribozavr Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58683 llvm-svn: 354957
* [clangd] Library dependencies in XPCJan Korous2019-02-271-2/+2
| | | | | | | | Patch by Nicholas Allegra Differential Revision: https://reviews.llvm.org/D58089 llvm-svn: 354949
* [clang-tidy] undo bitfields in ExceptionAnalyzerJonas Toth2019-02-261-4/+2
| | | | | | | Scoped enums do induce some problems with some MSVC and GCC versions if used as bitfields. Therefor this is deactivated for now. llvm-svn: 354903
* [clangd] Index UsingDeclsKadir Cetinkaya2019-02-264-8/+35
| | | | | | | | | | | | | | | | Summary: D58340 enables indexing of USRs, this makes sure test in clangd are aligned with the change Reviewers: hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58341 llvm-svn: 354879
* [clangd] Update docs to mention YCM integration and new LSP featuresKadir Cetinkaya2019-02-261-14/+14
| | | | | | | | | | | | | | Reviewers: gribozavr Reviewed By: gribozavr Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D56718 llvm-svn: 354865
* [clangd] Drop documentation in static index if symbols are not indexed for ↵Haojian Wu2019-02-255-8/+43
| | | | | | | | | | | | | | | | | | | completion. Summary: This is a further optimization of r350803, we drop docs in static index for symbols not being indexed for completion, while keeping the docs in dynamic index (we rely on dynamic index to get docs for class members). Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D56539 llvm-svn: 354792
* Moved clangd docs to a separate directory in preparation to restructure them ↵Dmitri Gribenko2019-02-253-180/+183
| | | | | | | | | | | | | | into multiple files Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58607 llvm-svn: 354786
* [clang-tidy] misc-string-integer-assignment: ignore toupper/tolowerClement Courbet2019-02-252-4/+18
| | | | | | | | | | | | | | Summary: Tis represents ~20% of false positives. See PR27723. Reviewers: xazax.hun, alexfh Subscribers: rnkovacs, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58604 llvm-svn: 354780
* Updated the documentation build instructions for the current CMake build systemDmitri Gribenko2019-02-251-8/+7
| | | | | | | | | | | | Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58603 llvm-svn: 354779
* Fixed grammar in index.rstDmitri Gribenko2019-02-251-1/+1
| | | | | | | | | | Subscribers: arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58601 llvm-svn: 354778
* Removed an unhelpful comment in index.rstDmitri Gribenko2019-02-251-5/+0
| | | | | | | | | | | | Reviewers: ilya-biryukov Subscribers: arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58602 llvm-svn: 354777
* [clangd] Add thread priority lowering for MacOS as wellKadir Cetinkaya2019-02-251-0/+8
| | | | | | | | | | | | Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58492 llvm-svn: 354765
* [clangd] Enhance macro hover to see full definitionMarc-Andre Laperle2019-02-242-8/+43
| | | | | | | | | | | | | | | | Summary: Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com> Reviewers: simark, ilya-biryukov, sammccall, ioeric, hokein Reviewed By: ilya-biryukov Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D55250 llvm-svn: 354761
* [clangd] Don't attach FixIt to the source code in macro.Haojian Wu2019-02-222-0/+17
| | | | | | | | | | | | | | | | | | Summary: We are less certain it is the correct fix. Also, clang doesn't apply FixIt to the source code in macro. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58525 llvm-svn: 354664
* [clangd] Only report explicitly typed symbols during code navigationKadir Cetinkaya2019-02-213-65/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Clangd was reporting implicit symbols, like results of implicit cast expressions during code navigation, which is not desired. For example: ``` struct Foo{ Foo(int); }; void bar(Foo); vod foo() { int x; bar(^x); } ``` Performing a GoTo on the point specified by ^ would give two results one pointing to line `int x` and the other for definition of `Foo(int);` Reviewers: ilya-biryukov, sammccall Subscribers: ioeric, MaskRay, jkorous, mgrang, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58495 llvm-svn: 354585
* [clangd] Enable indexing of template type parametersKadir Cetinkaya2019-02-213-6/+13
| | | | | | | | | | | | | | Summary: Fixes https://bugs.llvm.org/show_bug.cgi?id=36285 Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58294 llvm-svn: 354561
* [clangd] Handle another incomplete-type diagnostic case in IncludeFixer.Eric Liu2019-02-212-0/+6
| | | | llvm-svn: 354558
* Attempt to fix VS2015 build breakage from r354517. NFCI.Douglas Yung2019-02-211-1/+1
| | | | llvm-svn: 354545
* [clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈Stephane Moore2019-02-213-4/+34
| | | | | | | | | | | | | | | | | | | | | | Summary: Implicit functions are outside the control of source authors and should be exempt from style restrictions. Tested via running clang tools tests. This is an amended followup to https://reviews.llvm.org/D57207 Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: jdoerfert, xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58095 llvm-svn: 354534
* [clang-tidy] refactor ExceptionAnalyzer further to give ternary answerJonas Toth2019-02-203-83/+271
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The analsis on the throwing behvaiour on functions and statements gave only a binary answer whether an exception could occur and if yes which types are thrown. This refactoring allows keeping track if there is a unknown factor, because the code calls to some functions with unavailable source code with no `noexcept` information. This 'potential Unknown' information is propagated properly and can be queried separately. Reviewers: lebedev.ri, aaron.ballman, baloghadamsoftware, alexfh Reviewed By: lebedev.ri, baloghadamsoftware Subscribers: xazax.hun, rnkovacs, a.sidorin, Szelethus, donat.nagy, dkrupp, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57883 llvm-svn: 354517
* [clangd] Fix a crash in SelectionIlya Biryukov2019-02-202-2/+6
| | | | | | | | | | | | | | | | | | | Summary: The assertion checking that a range of a node is a token range does not hold in case of "split" tokens, e.g. between two closing template argument lists (`vector<vector<int>>`). Reviewers: kadircet, sammccall Reviewed By: kadircet Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58447 llvm-svn: 354507
* [clangd] Store index in '.clangd/index' instead of '.clangd-index'Ilya Biryukov2019-02-203-6/+6
| | | | | | | | | | | | | | | | Summary: To take up the .clangd folder for other potential uses in the future. Reviewers: kadircet, sammccall Reviewed By: kadircet Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58440 llvm-svn: 354505
* Update property prefix regex to allow numbers.Yan Zhang2019-02-202-10/+10
| | | | | | | | Subscribers: jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D56896 llvm-svn: 354485
* [clangd] Fix a typo. NFCIlya Biryukov2019-02-201-1/+1
| | | | | | | The documentation for -index-file mentioned clang-index instead of clangd-indexer. llvm-svn: 354456
* [clangd] Revert r354442 and r354444Kadir Cetinkaya2019-02-201-34/+0
| | | | | | Looks like sysroot is only working on linux. llvm-svn: 354453
* [clangd] Try to fix windows build botsKadir Cetinkaya2019-02-201-3/+8
| | | | llvm-svn: 354444
* [clangd] Testcase for bug 39811Kadir Cetinkaya2019-02-201-0/+29
| | | | | | | | | | Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58133 llvm-svn: 354442
* [clangd] Add an option in the code to not display number of fixesIlya Biryukov2019-02-192-3/+7
| | | | | | | | | | | | | | | | | | Summary: Only to the APIs, which are used by our embedders. We do not plan to add a user-facing option for this. Reviewers: sammccall, ioeric Reviewed By: sammccall Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58387 llvm-svn: 354349
* [clangd] Handle unresolved scope specifier when fixing includes.Eric Liu2019-02-192-41/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In the following examples, "clangd" is unresolved, and the fixer will try to fix include for `clang::clangd`; however, clang::clangd::X is usually intended. So when handling a qualifier that is unresolved, we change the unresolved name and scopes so that the fixer will fix "clang::clangd::X" in the following example. ``` namespace clang { clangd::X ~~~~~~ } // or clang::clangd::X ~~~~~~ ``` Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58185 llvm-svn: 354330
* [clangd] Add tests for template specializationsKadir Cetinkaya2019-02-181-0/+52
| | | | | | | | | | Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58190 llvm-svn: 354272
* [clangd] Cache include fixes for diagnostics caused by the same unresolved ↵Eric Liu2019-02-183-21/+113
| | | | | | | | | | | | | | | | | | | | | | name or incomplete type. Summary: Multiple diagnostics can be caused by the same unresolved name or incomplete type, especially if the code is copy-pasted without #includes. The cache can avoid making repetitive index requests, and thus reduce latency and allow more diagnostics to be fixed (we limit the number of index requests for each parse). Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58239 llvm-svn: 354268
* [clang-tidy] Fix links in docs.Alexander Kornienko2019-02-181-5/+6
| | | | llvm-svn: 354266
* [clang-tidy][NFCI] DanglingHandleCheck: Remove a superflous IgnoreParenImpCastsBruno Ricci2019-02-171-3/+2
| | | | | | | | | | | | ExprWithCleanups is currently not skipped by IgnoreParenImpCasts, but is skipped by IgnoreImpCasts. In view of fixing this inconsistency in D57267, remove the IgnoreParenImpCasts between the ReturnStmt and the ExprWithCleanups which is not needed since ExprWithCleanups is always created as a direct child of ReturnStmt (by inspection of each ReturnStmt::Create in Sema/SemaStmt.cpp). NFC intended. llvm-svn: 354228
* [clang-tidy] Delete obsolete objc-property-declaration options ✂️Stephane Moore2019-02-164-35/+6
| | | | | | | | | | | | | | | | | | | | | | Summary: The Acronyms and IncludeDefaultAcronyms options were deprecated in https://reviews.llvm.org/D51832. These options can be removed. Tested by running the clang-tidy tests. This is an amended resubmission of https://reviews.llvm.org/D56945. Reviewers: Eugene.Zelenko, aaron.ballman Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57080 llvm-svn: 354195
* [clangd] Unlink VFS working dir from OS working dir. Reland of r351051Sam McCall2019-02-151-2/+3
| | | | llvm-svn: 354116
* [clang-tidy] Mention language version in test explicitly.Volodymyr Sapsai2019-02-141-1/+1
| | | | | | | | | "modernize-use-using" check is applicable only to C++11 and later. Spell it out to avoid relying on default language version. rdar://problem/47932196 llvm-svn: 354069
* [clangd] Handle a few more diag kinds in include fixer.Eric Liu2019-02-132-4/+21
| | | | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58135 llvm-svn: 353926
* [clangd] Fix a lit-test.Kadir Cetinkaya2019-02-121-1/+1
| | | | | | | | | | | | | | | | | | Summary: Fixes https://bugs.llvm.org/show_bug.cgi?id=40593. Non-percent-encoded chars doesn't cause any problems on the input-side since we assume everything after authority section is data and don't interpret them as delimeters. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58126 llvm-svn: 353857
* [clangd] Fix use-after-free in XRefsSam McCall2019-02-121-8/+8
| | | | llvm-svn: 353821
* [NFC][clangd] Remove unused lambda captureFrancis Visoiu Mistrih2019-02-111-1/+1
| | | | | | | | | | | | | Avoid this warning: llvm/clang-tools-extra/clangd/ClangdServer.cpp:365:23: warning: lambda capture 'this' is not used [-Wunused-lambda-capture] auto Action = [Sel, this](decltype(CB) CB, std::string File, ~~^~~~ 1 warning generated. llvm-svn: 353760
* Revamp the "[clangd] Format tweak's replacements"Haojian Wu2019-02-118-69/+73
| | | | | | | | | | | | | | | | | | | | Summary: This patch contains two parts: 1) reverts commit r353306. 2) move the format logic out from tweaks, keep tweaks API unchanged. Reviewers: sammccall, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58051 llvm-svn: 353712
* [clangd] Prefer location from codegen files when merging symbols.Eric Liu2019-02-114-8/+103
| | | | | | | | | | | | | | | | | | | Summary: For example, if an index symbol has location in a .proto file and an AST symbol has location in a generated .proto.h file, then we prefer location in .proto which is more meaningful to users. Also use `mergeSymbols` to get the preferred location between AST location and index location in go-to-def. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58037 llvm-svn: 353708
OpenPOWER on IntegriCloud