summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra
Commit message (Collapse)AuthorAgeFilesLines
...
* [clangd] Fix a use after moveIlya Biryukov2019-01-301-2/+2
| | | | | | Introduced in r352494. llvm-svn: 352612
* Adjust documentation for git migration.James Y Knight2019-01-293-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes most references to the paths: llvm.org/svn/ llvm.org/git/ llvm.org/viewvc/ github.com/llvm-mirror/ github.com/llvm-project/ reviews.llvm.org/diffusion/ to instead point to https://github.com/llvm/llvm-project. This is *not* a trivial substitution, because additionally, all the checkout instructions had to be migrated to instruct users on how to use the monorepo layout, setting LLVM_ENABLE_PROJECTS instead of checking out various projects into various subdirectories. I've attempted to not change any scripts here, only documentation. The scripts will have to be addressed separately. Additionally, I've deleted one document which appeared to be outdated and unneeded: lldb/docs/building-with-debug-llvm.txt Differential Revision: https://reviews.llvm.org/D57330 llvm-svn: 352514
* [clangd] Remove extra ';' to fix -Wpedantic warning. NFCIlya Biryukov2019-01-291-1/+1
| | | | llvm-svn: 352511
* [clangd] Attempt to fix failing buildbots after r352494Ilya Biryukov2019-01-291-1/+1
| | | | | | | For failures see: http://lab.llvm.org:8011/builders/clang-x86_64-linux-abi-test/builds/38501/steps/build-unified-tree/logs/stdio llvm-svn: 352510
* [clangd] Make -clang-tidy-checks a non-hidden command-line argIlya Biryukov2019-01-291-2/+2
| | | | | | | | | | | | | | | | | | Summary: This looks like a useful user-facing configuration parameter, which should be discoverable. Also fix a small typo in the description. Reviewers: hokein Reviewed By: hokein Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D57384 llvm-svn: 352509
* [clangd] Unit test for sourceLocationInMainFile.Ilya Biryukov2019-01-291-0/+36
| | | | | | | This should have been part of r352494, which added the corresponding function. The unit test ended up as a separate commit accidentally. llvm-svn: 352501
* [clangd] Interfaces for writing code tweaksIlya Biryukov2019-01-2915-19/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The code tweaks are an implementation of mini-refactorings exposed via the LSP code actions. They run in two stages: - Stage 1. Decides whether the action is available to the user and collects all the information required to finish the action. Should be cheap, since this will run over all the actions known to clangd on each textDocument/codeAction request from the client. - Stage 2. Uses information from stage 1 to produce the actual edits that the code action should perform. This stage can be expensive and will only run if the user chooses to perform the specified action in the UI. One unfortunate consequence of this change is increased latency of processing the textDocument/codeAction requests, which now wait for an AST. However, we cannot avoid this with what we have available in the LSP today. Reviewers: kadircet, ioeric, hokein, sammccall Reviewed By: sammccall Subscribers: mgrang, mgorny, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D56267 llvm-svn: 352494
* [clangd] dlog clang-tidy configurationHaojian Wu2019-01-291-1/+1
| | | | | | vlog seems to be too spammy in unittests. llvm-svn: 352485
* [clangd] Make USRs for macros to be position independentKadir Cetinkaya2019-01-292-2/+9
| | | | | | | | | | | | | | Summary: USRs for macros were not cannonical due to usage of cursor location instead of definition location. Reviewers: jkorous Subscribers: ilya-biryukov, ioeric, MaskRay, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D57228 llvm-svn: 352481
* [clangd] Index main-file macros (bug 39761)Haojian Wu2019-01-283-22/+42
| | | | | | | | Patch by Nathan Ridge! Differential Revision: https://reviews.llvm.org/D55739 llvm-svn: 352367
* [clang-tidy] Fix a build error.Haojian Wu2019-01-281-1/+1
| | | | llvm-svn: 352364
* [clang-tidy] Add the abseil-duration-addition checkHyrum Wright2019-01-2811-1/+301
| | | | | | Differential Revision: https://reviews.llvm.org/D57185 llvm-svn: 352362
* [clangd] Suggest adding missing includes for incomplete type diagnostics.Eric Liu2019-01-2826-383/+763
| | | | | | | | | | | | | | | | | | | Summary: This enables clangd to intercept compiler diagnostics and attach fixes (e.g. by querying index). This patch adds missing includes for incomplete types e.g. member access into class with only forward declaration. This would allow adding missing includes for user-typed symbol names that are missing declarations (e.g. typos) in the future. Reviewers: sammccall Reviewed By: sammccall Subscribers: mgorny, ilya-biryukov, javed.absar, MaskRay, jkorous, mgrang, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D56903 llvm-svn: 352361
* Fix a lit test failure after D54438Kristof Umann2019-01-261-1/+1
| | | | llvm-svn: 352290
* [clang-tidy] fix unit tests for dropped _Float16 support in X86Jonas Toth2019-01-253-47/+51
| | | | | | | | | | | | | | | | Summary: Because _Float16 was disabled for X86 targets the unit-tests started failing. Extract the pieces for _Float16 and run theses tests under AArch64. Reviewers: aaron.ballman, erichkeane, lebedev.ri Reviewed By: erichkeane Subscribers: javed.absar, xazax.hun, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D57249 llvm-svn: 352231
* Temporairly disable readability-uppercase-literal-suffix tests that depend ↵Roman Lebedev2019-01-252-0/+4
| | | | | | on _Float16, to get bots back to green llvm-svn: 352224
* [clangd] NFC: fix clang-tidy warnings.Haojian Wu2019-01-2511-34/+35
| | | | | | | Most are about llvm code style violation (found via readability-identifier-naming check). llvm-svn: 352205
* [clangd] Log clang-tidy configuration, NFCHaojian Wu2019-01-251-0/+2
| | | | | | | | | | | | Summary: This is used for debugging purpose. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D57057 llvm-svn: 352184
* [clang-tidy] Add check for underscores in googletest names.Haojian Wu2019-01-258-0/+278
| | | | | | | | | | | | | | | | | | Summary: Adds a clang-tidy warning for underscores in googletest names. Patch by Kar Epker! Reviewers: hokein, alexfh, aaron.ballman Reviewed By: hokein Subscribers: Eugene.Zelenko, JonasToth, MyDeveloperDay, lebedev.ri, xazax.hun, mgorny, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D56424 llvm-svn: 352183
* [clang-tidy] Rename the absl duration helper functions; NFCHyrum Wright2019-01-246-15/+17
| | | | llvm-svn: 352088
* [clangd] Clean the cache of file statuses on vscode-clangd when clangd crashes.Haojian Wu2019-01-241-5/+17
| | | | | | | | | | | | | | Summary: Clear the cached file statuses, otherwise we will leave some garbage texts on the status bar when clangd crashes. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D56540 llvm-svn: 352049
* [CodeComplete] [clangd] Fix crash on ValueDecl with a null typeIlya Biryukov2019-01-242-1/+14
| | | | | | | | | | | | Reviewers: kadircet Reviewed By: kadircet Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D57093 llvm-svn: 352040
* [extra] unit tests enable crash-recovery cases on FreeBSDDavid Carlier2019-01-241-3/+1
| | | | | | | | | | | | Seems the previous statement does not hold up anymore. Reviewers: steveire Reviewed By: steveire Differential Revision: https://reviews.llvm.org/D57102 llvm-svn: 352031
* [clangd] Workaround a test failure after r351941Ilya Biryukov2019-01-231-2/+4
| | | | | | This should fix failing buildbots. llvm-svn: 351943
* [clangd] Fix crash due to ObjCPropertyDeclIlya Biryukov2019-01-232-4/+25
| | | | | | | | | | | | With ObjCPropertyDecl, ASTNode.OrigD can be a ObjCPropertyImplDecl which is not a NamedDecl, leading to a crash since the code incorrectly assumes ASTNode.OrigD will always be a NamedDecl. Change by dgoldman (David Goldman)! Differential Revision: https://reviews.llvm.org/D56916 llvm-svn: 351941
* [clangd] Link clangTidy into clangd testsHaojian Wu2019-01-231-0/+1
| | | | | | | | Patch by Nathan Ridge! Differential Revision: https://reviews.llvm.org/D57077 llvm-svn: 351929
* [doc] Fix svn property for bugprone-parent-virtual-call.rstZinovy Nis2019-01-231-0/+0
| | | | llvm-svn: 351925
* Revert rCTE351921 to fix documentation geneeration.Stephane Moore2019-01-234-6/+35
| | | | | | Original review: https://reviews.llvm.org/D56945 llvm-svn: 351922
* [clang-tidy] Delete obsolete objc-property-declaration options ✂️Stephane Moore2019-01-234-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. Reviewers: benhamilton, aaron.ballman Reviewed By: aaron.ballman Subscribers: Eugene.Zelenko, xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D56945 llvm-svn: 351921
* [doc] Replace 'class' with 'struct' for 'public' by defaultZinovy Nis2019-01-221-3/+3
| | | | | | Make sample syntax correct. llvm-svn: 351867
* [Documentation] Use HTTPS whenever possible.Eugene Zelenko2019-01-2218-96/+96
| | | | | | Differential revision: https://reviews.llvm.org/D56926 llvm-svn: 351862
* [clangd] Followup fix of rL351818Haojian Wu2019-01-221-3/+5
| | | | | | | | | ClangTidyOptions::getDefaults is not free, it will initialize all clang-tidy modules to get check-specific options, and we don't use this information in CodeComplete, so using an empty one (constructed by default constructor) is sufficient. llvm-svn: 351826
* Fix "missing field 'ClangTidyOpts' initializer" warning. NFCI.Simon Pilgrim2019-01-221-2/+3
| | | | llvm-svn: 351818
* [clang-tidy] Fix whitespace in docs. NFCAlexander Kornienko2019-01-221-15/+14
| | | | | | Actually, just testing commits via monorepo ;) llvm-svn: 351814
* [clangd] NFC: reduce log noise from Diagnostics.Eric Liu2019-01-221-2/+2
| | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D57042 llvm-svn: 351813
* [clangd] Fix the broken buildbot.Haojian Wu2019-01-221-0/+1
| | | | llvm-svn: 351812
* [clangd] Fix the `-Wtype-limits` warning, NFCHaojian Wu2019-01-221-1/+0
| | | | | | The assertion is always true, and triggers a compiler warning, so remove it. llvm-svn: 351809
* [clangd] NFC: Use buildCompilerInvocation in CodeCompleteKadir Cetinkaya2019-01-225-59/+46
| | | | | | | | | | | | Reviewers: ilya-biryukov, sammccall Reviewed By: sammccall Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D56860 llvm-svn: 351793
* [clangd] Support clang-tidy configuration in clangd.Haojian Wu2019-01-2212-20/+62
| | | | | | | | | | | | | | | | | | | | | Summary: This patch adds some basic supports for clang-tidy configurations in clangd: - clangd will respect .clang-tidy configurations for each file - we don't aim to support all clang-tidy options in clangd, only a small subset of condfigurations (options related to which checks will be enabled) are supported. - add a `clang-tidy-checks` CLI option that can override options from .clang-tidy file Reviewers: ilya-biryukov, sammccall Reviewed By: sammccall Subscribers: javed.absar, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D55256 llvm-svn: 351792
* [clangd] Filter out plugin related flags and move all commandline ↵Kadir Cetinkaya2019-01-229-42/+86
| | | | | | | | | | | | | | | | | | | | manipulations into OverlayCDB. Summary: Some projects make use of clang plugins when building, but clangd is not aware of those plugins therefore can't work with the same compile command arguments. There were multiple places clangd performed commandline manipulations, this one also moves them all into OverlayCDB. Reviewers: ilya-biryukov Subscribers: klimek, sammccall, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D56841 llvm-svn: 351788
* [clang-tidy] Work around http://llvm.org/PR40392Alexander Kornienko2019-01-212-4/+22
| | | | | | | | | The readability-else-after-return check should be smarter about cases where the variable defined in the condition is used in the `else` branch. This patch makes it just ignore such cases, but alternative solutions may be better (added a FIXME). llvm-svn: 351751
* [clang-tidy] Use getStripPluginsAdjusterKadir Cetinkaya2019-01-211-17/+1
| | | | | | | | | | | | Summary: See rC351531 for the introduction of getStripPluginsAdjuster. Reviewers: alexfh Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D56902 llvm-svn: 351738
* Fix typos throughout the license files that somehow I and my reviewersChandler Carruth2019-01-212-2/+2
| | | | | | | | | | | all missed! Thanks to Alex Bradbury for pointing this out, and the fact that I never added the intended `legacy` anchor to the developer policy. Add that anchor too. With hope, this will cause the links to all resolve successfully. llvm-svn: 351731
* [clang-tidy] misc-non-private-member-variables-in-classes: ignore implicit ↵Miklos Vajna2019-01-203-10/+28
| | | | | | | | | | methods Otherwise we don't warn on a struct containing a single public int, but we warn on a struct containing a single public std::string, which is inconsistent. llvm-svn: 351686
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-19759-3043/+2283
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Convert two more files that were using Windows line endings and removeChandler Carruth2019-01-191-58/+58
| | | | | | | a stray single '\r' from one file. These are the last line ending issues I can find in the files containing parts of LLVM's file headers. llvm-svn: 351634
* Update some code used in our visual studio plugins to use linux fileChandler Carruth2019-01-193-265/+265
| | | | | | | | endings. We already used them in some cases, and this makes things consistent. This will also simplify updating the licenses in these files. llvm-svn: 351632
* Install new LLVM license structure and new developer policy.Chandler Carruth2019-01-194-46/+476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This installs the new developer policy and moves all of the license files across all LLVM projects in the monorepo to the new license structure. The remaining projects will be moved independently. Note that I've left odd formatting and other idiosyncracies of the legacy license structure text alone to make the diff easier to read. Critically, note that we do not in any case *remove* the old license notice or terms, as that remains necessary until we finish the relicensing process. I've updated a few license files that refer to the LLVM license to instead simply refer generically to whatever license the LLVM project is under, basically trying to minimize confusion. This is really the culmination of so many people. Chris led the community discussions, drafted the policy update and organized the multi-year string of meeting between lawyers across the community to figure out the strategy. Numerous lawyers at companies in the community spent their time figuring out initial answers, and then the Foundation's lawyer Heather Meeker has done *so* much to help refine and get us ready here. I could keep going on, but I just want to make sure everyone realizes what a huge community effort this has been from the begining. Differential Revision: https://reviews.llvm.org/D56897 llvm-svn: 351631
* [clang-tidy] add reproducer for PR39949 into test-suiteJonas Toth2019-01-181-0/+33
| | | | | | | | | | | | | | | | | Summary: The underlying issue is fixed in https://reviews.llvm.org/D56444 and this test ensures the issue does not creep back into our code-base. Reviewers: alexfh, aaron.ballman, hokein, hwright Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D56918 llvm-svn: 351569
* [clangd] Make background index less chattyIlya Biryukov2019-01-181-1/+1
| | | | | | | | | | | | | | | | Summary: It is producing too much input in non-verbose mode, i.e. a message per indexed file Reviewers: sammccall, kadircet Reviewed By: sammccall Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D56915 llvm-svn: 351563
OpenPOWER on IntegriCloud