summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merging r343369:upstream/release_70Tom Stellard2018-12-061-1/+0
| | | | | | | | | | ------------------------------------------------------------------------ r343369 | vitalybuka | 2018-09-28 19:17:12 -0700 (Fri, 28 Sep 2018) | 1 line [cxx2a] Fix warning triggered by r343285 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_70@348452 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r344444 and r344445:Tom Stellard2018-11-293-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r344444 | baloghadamsoftware | 2018-10-13 03:34:52 -0700 (Sat, 13 Oct 2018) | 11 lines [clang-tidy] Optimize query in bugprone-exception-escape Checking whether a functions throws indirectly may be very expensive because it needs to visit its whole call graph. Therefore we should first check whether the function is forbidden to throw and only check whether it throws afterward. This also seems to solve bug https://bugs.llvm.org/show_bug.cgi?id=39167 where the execution time is so long that it seems to hang. Differential Revision: https://reviews.llvm.org/D53187 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r344445 | baloghadamsoftware | 2018-10-13 04:17:59 -0700 (Sat, 13 Oct 2018) | 3 lines [clang-tidy] Fix for typos in the tests for `bugprone-exception-escape` ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_70@347921 91177308-0d34-0410-b5e6-96231b3b80d8
* docs: drop doxygen link; it doesn't workHans Wennborg2018-09-101-18/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_70@341829 91177308-0d34-0410-b5e6-96231b3b80d8
* ReleaseNotes: tidy up for the releaseHans Wennborg2018-09-071-46/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_70@341663 91177308-0d34-0410-b5e6-96231b3b80d8
* Creating release_70 branch off revision 338536Hans Wennborg2018-08-010-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_70@338544 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Correct the namespace of ParsedAST forward declaration, NFC.Haojian Wu2018-08-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338526 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Receive compilationDatabasePath in 'initialize' requestSimon Marchi2018-08-014-13/+27
| | | | | | | | | | | | | | | | | | Summary: That way, as soon as the "initialize" is received by the server, it can start parsing/indexing with a valid compilation database and not have to wait for a an initial 'didChangeConfiguration' that might or might not happen. Then, when the user changes configuration, a didChangeConfiguration can be sent. Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Reviewers: malaperle Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D49833 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338518 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Make SymbolLocation => bool conversion explicitly.Haojian Wu2018-08-011-1/+8
| | | | | | | | | | | | | | | Summary: The implicit bool conversion could happen superisingly, e.g. when checking `if (Loc1 == Loc2)`, the compiler will convert SymbolLocation to bool before comparing (because we don't define operator `==` for SymbolLocation). Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D49657 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338517 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tidy] add all clang-tidy modules to pluginJonas Toth2018-07-312-11/+45
| | | | | | | | | | | | | | | | Summary: This patch addresses PR38359 and adds all existing clang-tidy modules to the plugin that can be used together with libclang. Reviewers: alexfh, aaron.ballman, hokein, ilya-biryukov Reviewed By: alexfh Subscribers: srhines, mgorny, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D50060 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338393 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Do not build AST if no diagnostics were requestedIlya Biryukov2018-07-311-2/+5
| | | | | | | | | | | | | | | | Summary: It can be removed from the cache before the first access anyway, so building it can be a waste of time. Reviewers: ioeric Reviewed By: ioeric Subscribers: javed.absar, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D49991 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338378 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Report diagnostics even if WantDiags::No AST was reusedIlya Biryukov2018-07-312-22/+71
| | | | | | | | | | | | | | | | Summary: After r338256, clangd stopped reporting diagnostics if WantDiags::No request is followed by a WantDiags::Yes request but the AST can be reused. Reviewers: ioeric Reviewed By: ioeric Subscribers: javed.absar, MaskRay, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50045 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338361 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Remove outdated comment. NFCIlya Biryukov2018-07-301-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338260 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Do not remove AST from cache if nothing changedIlya Biryukov2018-07-301-2/+5
| | | | | | | We were previously clearing the AST cache if the inputs and the preamble were the same, which is not desired. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338256 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Fix a comment. NFCIlya Biryukov2018-07-301-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338241 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Add command-line optionRaoul Wols2018-07-291-1/+12
| | | | | | | | to suppress the space and the circular dot prepended in a completion label. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338223 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tidy] Fix a crash in fuchsia-multiple-inheritanceIlya Biryukov2018-07-272-0/+16
| | | | | | | | | | | | | | Summary: See the test case for a repro. Reviewers: juliehockett, ioeric, hokein, aaron.ballman Reviewed By: hokein Subscribers: lebedev.ri, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D49862 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338124 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Return Dex IteratorsKirill Bobyrev2018-07-274-1/+617
| | | | | | | | | | | | | | | The original Dex Iterators patch (https://reviews.llvm.org/rL338017) caused problems for Clang 3.6 and Clang 3.7 due to the compiler bug which prevented inferring template parameter (`Size`) in create(And|Or)? functions. It was reverted in https://reviews.llvm.org/rL338054. In this revision the mentioned helper functions were replaced with variadic templated versions. Proposed changes were tested on multiple compiler versions, including Clang 3.6 which originally caused the failure. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338116 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert Clangd Dex Iterators patchKirill Bobyrev2018-07-264-611/+1
| | | | | | | | | | | | This reverts two revisions: * https://reviews.llvm.org/rL338017 * https://reviews.llvm.org/rL338028 They caused crash for Clang 3.6 & Clang 3.7 buildbots, it was reported by Jeremy Morse. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338054 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Use 'const Twine&' instead of 'Twine'. NFCIlya Biryukov2018-07-262-2/+2
| | | | | | To fix clang-tidy warning git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338037 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Fix unit tests for DexKirill Bobyrev2018-07-261-7/+20
| | | | | | | Iterators took temporary objects in constructors, objects were invalidated when built with recent Clang which resulted in crashes. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338028 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tidy] Fix llvm.org/PR38315 (support type aliases in ↵Alexander Kornienko2018-07-262-2/+15
| | | | | | modernize-shrink-to-fit) git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338025 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Fix (most) naming warnings from clang-tidy. NFCIlya Biryukov2018-07-2616-51/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338021 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Proof-of-concept query iterators for Dex symbol indexKirill Bobyrev2018-07-264-1/+600
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces three essential types of query iterators: `DocumentIterator`, `AndIterator`, `OrIterator`. It provides a convenient API for query tree generation and serves as a building block for the next generation symbol index - Dex. Currently, many optimizations are missed to improve code readability and to serve as the reference implementation. Potential improvements are briefly mentioned in `FIXME`s and will be addressed in the following patches. Dex RFC in the mailing list: http://lists.llvm.org/pipermail/clangd-dev/2018-July/000022.html Iterators, their applications and potential extensions are explained in detail in the design proposal: https://docs.google.com/document/d/1C-A6PGT6TynyaX4PXyExNMiGmJ2jL1UwV91Kyx11gOI/edit#heading=h.903u1zon9nkj Reviewers: ioeric, sammccall, ilya-biryukov Subscribers: cfe-commits, klimek, jfb, mgrang, mgorny, MaskRay, jkorous, arphaman Differential Revision: https://reviews.llvm.org/D49546 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338017 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Give an example for symbol-builder usageKirill Bobyrev2018-07-261-4/+17
| | | | | | | | | | | | | | | | `global-symbol-builder` help message mentions `-executor=<string>` option, but doesn't give any example of what the value could be Assuming the most popular use case to be building the whole project index, help message should probably give an example of such usage. Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49785 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338015 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Do not rebuild AST if inputs have not changedIlya Biryukov2018-07-265-14/+100
| | | | | | | | | | | | | | | | | Summary: If the contents are the same, the update most likely comes from the fact that compile commands were invalidated. In that case we want to avoid rebuilds in case the compile commands are actually the same. Reviewers: ioeric Reviewed By: ioeric Subscribers: simark, javed.absar, MaskRay, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D49783 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338012 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Use a sigmoid style function for #usages boost in symbol quality.Eric Liu2018-07-252-6/+17
| | | | | | | | | | | | | | | | | | Summary: This has a shape to similar logarithm function but grows much slower for large #usages. Metrics: https://reviews.llvm.org/P8096 Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, cfe-commits, sammccall Differential Revision: https://reviews.llvm.org/D49780 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337907 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Introduce Dex symbol index search tokensKirill Bobyrev2018-07-256-2/+408
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the core building block of the next-generation Clangd symbol index - Dex. Search tokens are the keys in the inverted index and represent a characteristic of a specific symbol: examples of search token types (Token Namespaces) are * Trigrams - these are essential for unqualified symbol name fuzzy search * Scopes for filtering the symbols by the namespace * Paths, e.g. these can be used to uprank symbols defined close to the edited file This patch outlines the generic for such token namespaces, but only implements trigram generation. The intuition behind trigram generation algorithm is that each extracted trigram is a valid sequence for Fuzzy Matcher jumps, proposed implementation utilize existing FuzzyMatcher API for segmentation and trigram extraction. However, trigrams generation algorithm for the query string is different from the previous one: it simply yields sequences of 3 consecutive lowercased valid characters (letters, digits). Dex RFC in the mailing list: http://lists.llvm.org/pipermail/clangd-dev/2018-July/000022.html The trigram generation techniques are described in detail in the proposal: https://docs.google.com/document/d/1C-A6PGT6TynyaX4PXyExNMiGmJ2jL1UwV91Kyx11gOI/edit#heading=h.903u1zon9nkj Reviewers: sammccall, ioeric, ilya-biryukovA Subscribers: cfe-commits, klimek, mgorny, MaskRay, jkorous, arphaman Differential Revision: https://reviews.llvm.org/D49591 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337901 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Guard fuzzer against empty inputs.Benjamin Kramer2018-07-241-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337860 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Tune down quality score for class constructors so that it's ranked ↵Eric Liu2018-07-243-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after class types. Summary: Currently, class constructors have the same score as the class types, and they are often ranked before class types. This is often not desireable and can be annoying when snippet is enabled and constructor signatures are added. Metrics: ``` ================================================================================================== OVERALL ================================================================================================== Total measurements: 111117 (+0) All measurements: MRR: 64.06 (+0.20) Top-5: 75.73% (+0.14%) Top-100: 93.71% (+0.01%) Full identifiers: MRR: 98.25 (+0.55) Top-5: 99.04% (+0.03%) Top-100: 99.16% (+0.00%) Filter length 0-5: MRR: 15.23 (+0.02) 50.50 (-0.02) 65.04 (+0.11) 70.75 (+0.19) 74.37 (+0.25) 79.43 (+0.32) Top-5: 40.90% (+0.03%) 74.52% (+0.03%) 87.23% (+0.15%) 91.68% (+0.08%) 93.68% (+0.14%) 95.87% (+0.12%) Top-100: 68.21% (+0.02%) 96.28% (+0.07%) 98.43% (+0.00%) 98.72% (+0.00%) 98.74% (+0.01%) 98.81% (+0.00%) ================================================================================================== DEFAULT ================================================================================================== Total measurements: 57535 (+0) All measurements: MRR: 58.07 (+0.37) Top-5: 69.94% (+0.26%) Top-100: 90.14% (+0.03%) Full identifiers: MRR: 97.13 (+1.05) Top-5: 98.14% (+0.06%) Top-100: 98.34% (+0.00%) Filter length 0-5: MRR: 13.91 (+0.00) 38.53 (+0.01) 55.58 (+0.21) 63.63 (+0.30) 69.23 (+0.47) 72.87 (+0.60) Top-5: 24.99% (+0.00%) 62.70% (+0.06%) 82.80% (+0.30%) 88.66% (+0.16%) 92.02% (+0.27%) 93.53% (+0.21%) Top-100: 51.56% (+0.05%) 93.19% (+0.13%) 97.30% (+0.00%) 97.81% (+0.00%) 97.85% (+0.01%) 97.79% (+0.00%) ``` Remark: - The full-id completions have +1.05 MRR improvement. - There is no noticeable impact on EXPLICIT_MEMBER_ACCESS and WANT_LOCAL. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D49667 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337816 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tidy] fix PR36489 - respect deduced pointer types from auto as wellJonas Toth2018-07-232-2/+59
| | | | | | | | | | | | | | | | | | | | Summary: The cppcoreguidelines-pro-bounds-pointer-arithmetic warns on all occassion where pointer arithmetic is used, but does not check values where the pointer types is deduced via `auto`. This patch adjusts this behaviour and solved PR36489. I accidentally commited a wrong patch, this Differential is meant to have a correct revision description and code attached to it. Because the patch was accepted by aaron.ballman already, i will just commit it. See https://reviews.llvm.org/D48717 for the old differntial (contains wrong code from the mixup) Subscribers: nemanjai, xazax.hun, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D49682 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337716 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[clang-tidy] fix PR36489 - respect deduced pointer types from auto ↵Jonas Toth2018-07-231-28/+1
| | | | | | | | as well" I applied the wrong patch. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337712 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tidy] fix PR36489 - respect deduced pointer types from auto as wellJonas Toth2018-07-231-1/+28
| | | | | | | | | | | | | | | | | | Summary: The cppcoreguidelines-pro-bounds-pointer-arithmetic warns on all occassion where pointer arithmetic is used, but does not check values where the pointer types is deduced via ``auto``. This patch adjusts this behaviour and solved PR36489. Reviewers: alexfh, aaron.ballman, hokein, ilya-biryukov Reviewed By: alexfh, aaron.ballman Subscribers: nemanjai, xazax.hun, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D48717 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337710 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tidy] remove private decltypeType in TrailingReturnTypeJonas Toth2018-07-231-2/+0
| | | | | | | | | | | | | | | | Summary: This patch removes a private matcher in fuchsia/TrailingReturnType check because the matcher is now in ASTMatchers Reviewers: aaron.ballman, alexfh, hokein Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D49618 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337707 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Fix category in clangd-vscode's package.jsonSimon Marchi2018-07-231-1/+1
| | | | | | | | | | | | | | | | | Summary: When opening package.json, vscode shows: Use 'Programming Languages' instead Replacing "Languages" with this fixes it. Reviewers: ilya-biryukov Subscribers: arphaman, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D49253 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337697 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Penalize non-instance members when accessed via class instances.Eric Liu2018-07-236-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The following are metrics for explicit member access completions. There is no noticeable impact on other completion types. Before: EXPLICIT_MEMBER_ACCESS Total measurements: 24382 All measurements: MRR: 62.27 Top10: 80.21% Top-100: 94.48% Full identifiers: MRR: 98.81 Top10: 99.89% Top-100: 99.95% 0-5 filter len: MRR: 13.25 46.31 62.47 67.77 70.40 81.91 Top-10: 29% 74% 84% 91% 91% 97% Top-100: 67% 99% 99% 99% 99% 100% After: EXPLICIT_MEMBER_ACCESS Total measurements: 24382 All measurements: MRR: 63.18 Top10: 80.58% Top-100: 95.07% Full identifiers: MRR: 98.79 Top10: 99.89% Top-100: 99.95% 0-5 filter len: MRR: 13.84 48.39 63.55 68.83 71.28 82.64 Top-10: 30% 75% 84% 91% 91% 97% Top-100: 70% 99% 99% 99% 99% 100% * Top-N: wanted result is found in the first N completion results. * MRR: Mean reciprocal rank. Remark: the change seems to have minor positive impact. Although the improvement is relatively small, down-ranking non-instance members in instance member access should reduce noise in the completion results. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D49543 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337681 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Unbreak fuzzer build.Benjamin Kramer2018-07-221-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337655 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-doc] Create a script to generate testsJulie Hockett2018-07-2024-1389/+1834
| | | | | | | | | Upstreaming the script I use to generate clang-doc tests (and updating the existing tests to use it) Differential Revision: https://reviews.llvm.org/D49268 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337632 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-doc] Adding PublicOnly flagJulie Hockett2018-07-2012-32/+528
| | | | | | | | | | | Submitted on behalf of Annie Cherkaev (@anniecherk) Added a flag which, when enabled, documents only those methods and fields which have a Public attribute. Differential Revision: https://reviews.llvm.org/D48395 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337602 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Fix racy use-after-scope in unittestBenjamin Kramer2018-07-201-2/+1
| | | | | | This only shows up with asan when the stars align in a bad way. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337601 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] FuzzyMatch exposes an API for its word segmentation. NFCSam McCall2018-07-203-45/+81
| | | | | | | | | | | | Summary: This is intended to be used for indexing, e.g. in D49417 Reviewers: ioeric, omtcyfz Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D49540 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337527 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Also get scope for RK_pattern completion results.Eric Liu2018-07-182-2/+16
| | | | | | | For exmaple, clas field candidates in constructor initializers can be RK_Pattern, but they can still have scopes. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337396 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tidy: modernize] Fix modernize-use-equals-default with {} brackets ↵Idriss Riouak2018-07-172-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | list initialization: patch Summary: Hello, i would like to suggest a fix for one of the checks in clang-tidy. The bug was reported in https://bugs.llvm.org/show_bug.cgi?id=38039 where you can find more information. ``` struct UOB{ UOB(const UOB &Other):j{Other.j}{} int j; }; ``` In this case the check modernize-use-equals-default does not detect copy constructors that can be defaulted; that should be: ``` struct UOB{ UOB(const UOB &Other) = default; int j; }; ``` Reviewers: aaron.ballman, hokein, alexfh Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49356 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337286 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tidy] Force exceptions to be enabled in testBenjamin Kramer2018-07-141-1/+1
| | | | | | For targets that have them off by default. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337091 91177308-0d34-0410-b5e6-96231b3b80d8
* [Documentation] Add missing description for bugprone-exception-escape in ↵Eugene Zelenko2018-07-131-0/+3
| | | | | | Release Notes. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337069 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tidy] Exception Escape CheckerAdam Balogh2018-07-138-0/+571
| | | | | | | | | | | | | Finds functions which may throw an exception directly or indirectly, but they should not: Destructors, move constructors, move assignment operators, the main() function, swap() functions, functions marked with throw() or noexcept and functions given as option to the checker. Differential Revision: https://reviews.llvm.org/D33537 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@336997 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tidy] readability-inconsistent-declaration-parameter-name: accept ↵Sam McCall2018-07-135-10/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | approximate name matches. Summary: The goal is to reduce false positives when the difference is intentional, like: foo(StringRef name); foo(StringRef name_ref) { string name = cleanup(name_ref); ... } Or semantically unimportant, like: foo(StringRef full_name); foo(StringRef name) { ... } There are other matching names we won't recognise (e.g. syns vs synonyms) but this catches many that we see in practice, and gives people a systematic workaround. The old behavior is available as a 'Strict' option. Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D49285 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@336992 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tidy/ObjC] Add SQL to list of acronymsBen Hamilton2018-07-121-0/+1
| | | | | | | | | | | | | | Summary: SQL is a common acronym. Reviewers: Wizard, hokein Reviewed By: Wizard, hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49190 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@336919 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Extract FileSystemProvider into a separate header. NFCSam McCall2018-07-123-20/+43
| | | | | | | | | | | | Reviewers: sammccall Reviewed By: sammccall Subscribers: mgorny, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D49142 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@336909 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] log request/response messages with method/ID/error at INFO levelSam McCall2018-07-121-8/+29
| | | | | | | | | | | | Summary: Bodies are logged at VERBOSE level (since r336785), tweak the formatting. Reviewers: hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D49224 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@336899 91177308-0d34-0410-b5e6-96231b3b80d8
* [clangd] Simplify logging wrapper after r336888Sam McCall2018-07-121-14/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@336890 91177308-0d34-0410-b5e6-96231b3b80d8