summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-tidy] Add abseil-duration-conversion-cast checkHyrum Wright2019-01-178-1/+257
| | | | | | Differential Revision: https://reviews.llvm.org/D56532 llvm-svn: 351473
* Revert r351208 (which was a revert of r350892).Aaron Ballman2019-01-173-36/+26
| | | | | | This corresponds to the fix to Clang in r351470. llvm-svn: 351471
* [Documentation] Fix another link in docs/clang-tidy/Contributing.rst.Eugene Zelenko2019-01-171-6/+9
| | | | llvm-svn: 351468
* [Documentation] Another attempt to fix link in ↵Eugene Zelenko2019-01-171-14/+15
| | | | | | docs/clang-tidy/Contributing.rst. Use HTTPS for links. llvm-svn: 351467
* [Documentation] Fix link in docs/clang-tidy/Contributing.rst.Eugene Zelenko2019-01-171-2/+3
| | | | llvm-svn: 351466
* [Documentation] Add a chapter about Clang-tidy integrations.Eugene Zelenko2019-01-173-508/+626
| | | | | | | | Patch by Marina Kalashina. Differential Revision: https://reviews.llvm.org/D54945 llvm-svn: 351463
* [clang-tidy] Move the macro helper function to a common location; NFCHyrum Wright2019-01-163-22/+24
| | | | | | This is useful for multiple checks. llvm-svn: 351348
* Bump the trunk version to 9.0.0svnHans Wennborg2019-01-162-242/+8
| | | | llvm-svn: 351320
* Fix build breakage from llvm r351317Pavel Labath2019-01-162-7/+2
| | | | | | | The two-argument version of llvm::sys::fs::make_absolute no longer returns an error code. llvm-svn: 351319
* [clang-tidy] bugprone-string-constructor: Catch string from nullptr.Clement Courbet2019-01-162-0/+27
| | | | | | | | | | Summary: Context: https://twitter.com/willkirkby/status/1084219580799741953 Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D56657 llvm-svn: 351308
* [clang-tidy] Avoid fuchsia-overloaded-operator false positive with lambdas ↵Sam McCall2019-01-162-0/+4
| | | | | | after r351047 llvm-svn: 351307
* [clangd] Fix XPC after rCTE351280Fangrui Song2019-01-161-3/+3
| | | | llvm-svn: 351306
* [clang-tidy] Treat references to smart pointers correctly in use-after-move.Martin Bohme2019-01-162-1/+14
| | | | | | | | | | | | | | | | | | | Summary: Previously, we weren't recognizing these as smart pointers and thus weren't allowing non-dereference accesses as we should -- see new test cases which fail without the fix. Reviewers: alexfh, hokein, aaron.ballman, JonasToth Reviewed By: JonasToth Subscribers: xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D56585 llvm-svn: 351303
* [clangd] XPC transport layerJan Korous2019-01-1625-9/+722
| | | | | | | | | | | | - New transport layer for macOS. - XPC Framework - Test client Framework and client were written by Alex Lorenz. Differential Revision: https://reviews.llvm.org/D54428 llvm-svn: 351280
* [clang-tidy] add options documentation to readability-identifier-naming checkerPaul Hoad2019-01-151-8/+1913
| | | | | | | | | | | | | | | | | | | | | Summary: The documentation for this clang-checker did not explain what the options are. But this checkers only works with at least some options defined. To discover the options, you have to read the source code. This shouldn't be necessary for users who just have access to the clang-tidy binary. This revision, explains the options and gives an example. Patch by MyDeveloperDay. Reviewers: JonasToth, Eugene.Zelenko Reviewed By: JonasToth Subscribers: xazax.hun, Eugene.Zelenko Differential Revision: https://reviews.llvm.org/D56563 llvm-svn: 351261
* Revert "Update clang-tools-extra for r350891 from Clang."Benjamin Kramer2019-01-153-26/+36
| | | | | | This reverts commit r350892. llvm-svn: 351208
* Update year in license filesHans Wennborg2019-01-152-2/+2
| | | | | | | In last year's update (D48219) it was suggested that the release manager might want to do this, so here we go. llvm-svn: 351194
* [clangd] Fix updated file detection logic in indexingKadir Cetinkaya2019-01-153-33/+110
| | | | | | | | | | | | | | | | | Summary: Files without any symbols were never marked as updated during indexing, which resulted in failure while writing shards for these files. This patch fixes the logic to mark files that are seen for the first time but don't contain any symbols as updated. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D56592 llvm-svn: 351170
* Revert r351051 "[clangd] Unlink VFS working dir from OS working dir."Amara Emerson2019-01-141-3/+2
| | | | | | The llvm commit r351050 broke some bots and was reverted. llvm-svn: 351100
* [clangd] Add Limit parameter for xref.Haojian Wu2019-01-1412-40/+92
| | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D56597 llvm-svn: 351081
* [clangd] Fix a reference invalidationKadir Cetinkaya2019-01-141-15/+19
| | | | | | | | | | Summary: Fix for the breakage in http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/52811/consoleFull#-42777206a1ca8a51-895e-46c6-af87-ce24fa4cd561 Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D56656 llvm-svn: 351052
* [clangd] Unlink VFS working dir from OS working dir.Sam McCall2019-01-141-2/+3
| | | | | | | | | | | | A lot of our previous FS manipulation was thread-unsafe in practice with the RealFS implementation. This switches to a different RealFS mode where path-manipulation is used to simulate multiple working dirs. r351050 both added this mode and removed the cache. If we want to move back to the old implementation we need to put the cache back. llvm-svn: 351051
* [clang-tidy] update FunctionSizeCheck for D56444Sam McCall2019-01-141-1/+6
| | | | | | | | | | Reviewers: JonasToth, aaron.ballman Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D56552 llvm-svn: 351048
* [clangd] Index main-file symbols (bug 39761)Sam McCall2019-01-146-54/+122
| | | | | | | | Patch by Nathan Ridge! Differential Revision: https://reviews.llvm.org/D55185 llvm-svn: 351041
* [clang-tidy] new check 'readability-redundant-preprocessor'Miklos Vajna2019-01-1110-0/+340
| | | | | | | | | | Finds potentially redundant preprocessor directives. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D54349 llvm-svn: 350922
* Adapt to CXXMethodDecl::getThisType change (NFC)Brian Gesiak2019-01-111-3/+1
| | | | | | | | | Summary: https://reviews.llvm.org/D56509 changed the API of the CXXMethodDecl::getThisType method. Adapt to the change (and re-apply clang-format) to fix the clang-tidy build. llvm-svn: 350916
* Update clang-tools-extra for r350891 from Clang.Aaron Ballman2019-01-103-36/+26
| | | | llvm-svn: 350892
* [clangd] Introduce loading of shards within auto-indexKadir Cetinkaya2019-01-104-70/+298
| | | | | | | | | | | | | | | | Summary: Whenever a change happens on a CDB, load shards associated with that CDB before issuing re-index actions. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D55224 llvm-svn: 350847
* [clang-tidy] Fix case of local variables in modernize-use-nodiscard checkerJonas Toth2019-01-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Correct the case of the local variables.. Rational: I want to be able to run clang-tidy on new clang-tidy checker code prior to creating a review (to demonstrate we should dog food our own tools during development, not my suggestion but @Eugene.Zelenko) To this end I am running the following in a script, prior to make a change. ``` tidy: @for source in $$(git status -suno | grep ".cpp$$" | cut -c4-) ;\ do \ clang-tidy -quiet $$source -- $(TIDY_FLAGS);\ done ``` I then want to go through the checkers and see which checkers most closely match the review style of the reviewers ``` --- Checks: ' -clang-diagnostic-*, readability-identifier-naming, llvm-header-guard ' WarningsAsErrors: '' HeaderFilterRegex: '' AnalyzeTemporaryDtors: false FormatStyle: LLVM CheckOptions: - key: readability-identifier-naming.IgnoreFailedSplit value: '0' - key: readability-identifier-naming.VariableCase value: 'CamelCase' - key: readability-identifier-naming.LocalVariableCase value: 'CamelCase' ... ``` Unfortunately in doing so, I have identified that my previous review {D55433} it violates what looks like to be the convention of local variables being in CamelCase. Sending this small review in the hope it can be corrected. Patch by MyDeveloperDay. Reviewers: JonasToth, Eugene.Zelenko Reviewed By: JonasToth Subscribers: xazax.hun, Eugene.Zelenko Differential Revision: https://reviews.llvm.org/D56536 llvm-svn: 350814
* [clangd] Don't store completion info if the symbol is not used for code ↵Haojian Wu2019-01-103-14/+38
| | | | | | | | | | | | | | | | | | | | | completion. Summary: This would save us some memory and disk space: - Dex usage (261 MB vs 266 MB) - Disk (75 MB vs 76 MB) It would save more when we index the main file symbol D55185. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: nridge, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D56314 llvm-svn: 350803
* Remove unnecessary include.Richard Trieu2019-01-101-1/+0
| | | | | | | QuerySession.h does not need anything from Query.h, so it does not need to include it. llvm-svn: 350797
* [clang-tidy] another take at fixing docJonas Toth2019-01-091-8/+12
| | | | llvm-svn: 350765
* [clang-tidy] tryfix documentation buildJonas Toth2019-01-091-12/+13
| | | | llvm-svn: 350763
* [clang-tidy] fix-up failing testsJonas Toth2019-01-093-10/+11
| | | | llvm-svn: 350761
* [clang-tidy] Adding a new modernize use nodiscard checkerJonas Toth2019-01-0914-0/+653
| | | | | | | | | | | | | | | | | | Summary: Adds a checker to clang-tidy to warn when a non void const member function, taking only parameters passed by value or const reference could be marked as '[[nodiscard]]' Patch by MyDeveloperDay. Reviewers: alexfh, stephenkelly, curdeius, aaron.ballman, hokein, JonasToth Reviewed By: curdeius, JonasToth Subscribers: Eugene.Zelenko, lefticus, lebedev.ri, mgorny, xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D55433 llvm-svn: 350760
* [clangd] Add a test for SignatureHelp on dynamic index.Haojian Wu2019-01-091-0/+31
| | | | | | | | | | | | Summary: This would catch regressions caused by future changes of the index. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D56483 llvm-svn: 350720
* Fix clang-tidy test after r350714. NFCIlya Biryukov2019-01-091-0/+1
| | | | llvm-svn: 350715
* [Query] NFC: Port QueryParser to StringRefStephen Kelly2019-01-082-29/+19
| | | | | | | | | | | | | | Summary: There is no reason for it to not be a StringRef. Making it one simplifies existing code, and makes follow-up features easier. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56415 llvm-svn: 350660
* [clangd] Fix a crash when reading an empty index file.Haojian Wu2019-01-082-3/+10
| | | | | | | | | | | | | | | Summary: Unfortunately, yaml::Input::setCurrentDocument() and yaml::Input::nextDocument() are internal APIs, the way we use them may cause a nullptr accessing when processing an empty YAML file. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D56442 llvm-svn: 350633
* ReleaseNotes: Update with my clang-query contributions this cycleStephen Kelly2019-01-081-1/+41
| | | | llvm-svn: 350584
* [clangd] Fix Windows build after r350531Ilya Biryukov2019-01-071-1/+1
| | | | llvm-svn: 350542
* [clangd] Include <cstdio> instead of <stdio.h>. NFCIlya Biryukov2019-01-072-2/+2
| | | | | | This fixes the only clang-tidy check currently enabled by clangd. llvm-svn: 350540
* [clangd] Remove 'using namespace llvm' from .cpp files. NFCIlya Biryukov2019-01-0780-1745/+1822
| | | | | | | | The new guideline is to qualify with 'llvm::' explicitly both in '.h' and '.cpp' files. This simplifies moving the code between header and source files and is easier to keep consistent. llvm-svn: 350531
* [clang-tidy] Use the public hasInit matcher, rather than defining our own, NFCHyrum Wright2019-01-071-21/+7
| | | | llvm-svn: 350526
* [clangd] Fix a regression issue caused by r348365.Haojian Wu2019-01-072-5/+18
| | | | | | | | | | | | | | | | | | | | | Summary: With r348365, we now detect libc++ dir using the actual compiler path (from the compilation command), rather than the resource-dir. This new behavior will cause clangd couldn't find libc++ dir (even the libc++ is built from the source) when using a fallback compilation command (`clang xxx`) The fix is to use `<clangd_install_dir>/clang` as the actual compiler path. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D56380 llvm-svn: 350515
* [clangd] Disable BackgroundIndexTest.PeriodicalIndexIlya Biryukov2019-01-071-1/+3
| | | | | | It sometimes fails on AArch64. llvm-svn: 350512
* [Documentation] fix order of checks in checks/list.rstJonas Toth2019-01-051-3/+3
| | | | llvm-svn: 350466
* [clangd] Fix detecting atomics in stand-alone buildsMichal Gorny2019-01-031-0/+5
| | | | | | | | | | | | | Include CheckAtomic CMake module from LLVM in order to detect support for atomics when building stand-alone. Otherwise, the HAVE_CXX_ATOMICS64_WITHOUT_LIB variable is undefined and clangd wrongly attempts to link -latomic on systems not using the library. Original bug report: https://bugs.gentoo.org/667016 Differential Revision: https://reviews.llvm.org/D56061 llvm-svn: 350329
* [clangd] Move helpers from global namespace into anonymous namespace, NFC.Haojian Wu2019-01-031-22/+22
| | | | llvm-svn: 350325
* [clangd] Bump vscode-clangd v0.0.9Haojian Wu2019-01-031-1/+1
| | | | llvm-svn: 350324
OpenPOWER on IntegriCloud