summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Fix naming in container-size-empty.Kirill Bobyrev2016-09-131-4/+4
| | | | llvm-svn: 281313
* [clang-tidy] Extend readability-container-size-empty to arbitrary class with ↵Kirill Bobyrev2016-09-133-17/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | size() and empty() This patch extends readability-container-size-empty check allowing it to produce warnings not only for STL containers, but also for containers, which provide two functions matching following signatures: * `size_type size() const;` * `bool empty() const;` Where `size_type` can be any kind of integer type. This functionality was proposed in https://llvm.org/bugs/show_bug.cgi?id=26823 by Eugene Zelenko. Approval: alexfh Reviewers: alexfh, aaron.ballman, Eugene.Zelenko Subscribers: etienneb, Prazek, hokein, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D24349 llvm-svn: 281307
* [clang-tidy] readability-misplaced-array-index: add new check that warns ↵Daniel Marjamaki2016-09-128-0/+164
| | | | | | | | | | when array index is misplaced. Reviewers: alexfh Differential Revision: https://reviews.llvm.org/D21134 llvm-svn: 281206
* Revert "Resubmit "Add a test for clang-tidy using the clang-cl driver.""Ahmed Bougacha2016-09-081-17/+0
| | | | | | | | | | This reverts commit r280839. It's problematic on OS X, where the '/Users/...' paths are interpreted as '/U' options. Investigation ongoing in http://llvm.org/PR30328. llvm-svn: 280975
* Fix a few oversights in the clang-tidy VS plugin.Zachary Turner2016-09-074-9/+2
| | | | | | | Over-zealous cleanup of using statements removed some that were actually needed. Also cleaned up a few warnings. llvm-svn: 280844
* Add a clang-tidy visual studio extension.Zachary Turner2016-09-0738-0/+3309
| | | | | | | | | | | For now this only adds the UI necessary to configure clang-tidy settings graphically, and it enables reading in and saving out of .clang-tidy files. It does not actually run clang-tidy on any source files yet. Differential Revision: https://reviews.llvm.org/D23848 llvm-svn: 280840
* Resubmit "Add a test for clang-tidy using the clang-cl driver."Zachary Turner2016-09-071-0/+17
| | | | | | | | This was originally reverted because the patch on the clang tooling side was reverted. That patch is being resubmitted, so this patch is resubmitted as well. llvm-svn: 280839
* [include-fixer] Support finding headers for the symbol under cursor.Haojian Wu2016-09-075-12/+111
| | | | | | | | | | | | | | Summary: * Add a `query-symbol` option to query symbol without parsing the source file. * Update Vim & Emacs integration scripts. Reviewers: bkramer, massberg Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24075 llvm-svn: 280824
* [include-fixer] Fix some Clang-tidy modernize-use-override and Include What ↵Eugene Zelenko2016-09-062-3/+9
| | | | | | | | You Use warnings; other minor fixes. Differential revision: https://reviews.llvm.org/D24179 llvm-svn: 280741
* [Release notes] Fix links.Eugene Zelenko2016-09-061-6/+6
| | | | | | Differential revision: https://reviews.llvm.org/D24201 llvm-svn: 280725
* [clang-rename] Add comment after namespace closingKirill Bobyrev2016-09-051-2/+3
| | | | llvm-svn: 280653
* [clang-rename] Enforce LLVM policy about braces around single line control ↵Kirill Bobyrev2016-09-044-62/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | flow statement body. Although it is not explicitly stated in LLVM Coding Standards, LLVM developers prefer to omit braces around flow control statements with single line body. For example the following piece of code ``` if (condition) std::cout << "Hello, world!" << std::endl; ``` is preferred to ``` if (condition) { std::cout << "Hello, world!" << std::endl; } ``` So far clang-rename has ignored this. This patch makes clang-rename more "LLVM-ish". llvm-svn: 280640
* [clang-rename] add failing testKirill Bobyrev2016-09-041-0/+22
| | | | | | | For some reason clang-rename fails to rename method of templated class. Add XFAIL test reproducing the issue. llvm-svn: 280639
* [clang-rename] Fix Clang-tidy and IWYU warnings; other minor fixesKirill Bobyrev2016-09-041-3/+7
| | | | | | | | | Patch by Eugene Zelenko! Differential Revision: https://reviews.llvm.org/D24178 Reviewers: omtcyfz llvm-svn: 280638
* Remove link to clang's release notes; keeping it up-to-date is hardHans Wennborg2016-09-021-3/+1
| | | | llvm-svn: 280539
* Add clang-reorder-fields to clang-tools-extraAlexander Shaposhnikov2016-09-0213-0/+545
| | | | | | | | | | This diff adds v0 of clang-reorder-fields tool to clang/tools/extra. The main idea behind this tool is to simplify and make less error-prone refactoring of large codebases when someone needs to change the order fields of a struct/class (for example to remove excessive padding). Differential revision: https://reviews.llvm.org/D23279 llvm-svn: 280456
* Revert https://reviews.llvm.org/D23279 because the tests have failed on ↵Alexander Shaposhnikov2016-09-0213-541/+0
| | | | | | several platforms llvm-svn: 280438
* Add clang-reorder-fields to clang-tools-extraAlexander Shaposhnikov2016-09-0113-0/+541
| | | | | | | | | | This diff adds v0 of clang-reorder-fields tool to clang/tools/extra. The main idea behind this tool is to simplify and make less error-prone refactoring of large codebases when someone needs to change the order fields of a struct/class (for example to remove excess padding). Differential revision: https://reviews.llvm.org/D23279 llvm-svn: 280431
* [include-fixer] Fix an undefined variable exception in vim script when there isHaojian Wu2016-09-011-0/+1
| | | | | | only one candidate header. llvm-svn: 280359
* [clang-tidy docs] Add missing option docs.Haojian Wu2016-08-3119-12/+217
| | | | | | | | | | Reviewers: alexfh, Eugene.Zelenko, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: https://reviews.llvm.org/D23918 llvm-svn: 280236
* [docs] Fix docs build error.Haojian Wu2016-08-311-0/+1
| | | | llvm-svn: 280235
* [clang-tidy] modernize-make-{smart_ptr} private ctor bugfixPiotr Padlewski2016-08-314-1/+79
| | | | | | | | | | | | | | | Summary: Bugfix for 27321. When the constructor of stored pointer type is private then it is invalid to change it to make_shared or make_unique. Reviewers: alexfh, aaron.ballman, hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23343 llvm-svn: 280180
* [Release notes] Fix highlighting.Eugene Zelenko2016-08-301-2/+2
| | | | llvm-svn: 280119
* [clang-tidy docs] Fix build errors on Sphinx 1.4.6Haojian Wu2016-08-302-4/+4
| | | | llvm-svn: 280095
* clang-tools-extra/test/clang-tidy/misc-move-forwarding-reference.cpp: ↵NAKAMURA Takumi2016-08-301-1/+1
| | | | | | Appease ms targets with -fno-delayed-template-parsing. llvm-svn: 280078
* [clang-tidy] Add check 'misc-move-forwarding-reference'Martin Bohme2016-08-308-0/+379
| | | | | | | | | | | | | | | | | | | | | | | Summary: The check emits a warning if std::move() is applied to a forwarding reference, i.e. an rvalue reference of a function template argument type. If a developer is unaware of the special rules for template argument deduction on forwarding references, it will seem reasonable to apply std::move() to the forwarding reference, in the same way that this would be done for a "normal" rvalue reference. This has a consequence that is usually unwanted and possibly surprising: If the function that takes the forwarding reference as its parameter is called with an lvalue, that lvalue will be moved from (and hence placed into an indeterminate state) even though no std::move() was applied to the lvalue at the callsite. As a fix, the check will suggest replacing the std::move() with a std::forward(). This patch requires D23004 to be submitted before it. Reviewers: sbenza, aaron.ballman Subscribers: klimek, etienneb, alexfh, aaron.ballman, Prazek, Eugene.Zelenko, mgehre, cfe-commits Projects: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D22220 llvm-svn: 280077
* clang-rename: fix formatting in USRFinderMiklos Vajna2016-08-301-2/+1
| | | | | | As detected by clang-format. llvm-svn: 280063
* clang-rename: improve error message when -old-name is used and could not ↵Miklos Vajna2016-08-302-6/+11
| | | | | | | | | | | | | | find symbol Old output was: clang-rename: could not find symbol at tools/clang/tools/extra/test/clang-rename/ClassFindByName.cpp:1:1 (offset 0). Reviewers: omtcyfz Differential Revision: https://reviews.llvm.org/D24002 llvm-svn: 280062
* Fix some typos in the docSylvestre Ledru2016-08-283-5/+5
| | | | llvm-svn: 279944
* [Clang-tidy] Fix some checks documentation style.Eugene Zelenko2016-08-2630-179/+193
| | | | | | Differential revision: https://reviews.llvm.org/D23894 llvm-svn: 279846
* [clang-tidy] Some tweaks on header guard checks.Haojian Wu2016-08-265-26/+34
| | | | | | | | * Implement missing storeOption interfaces. * Remove unnecessary parameter copy in isHeaderFileExtension. * Fix doc style. llvm-svn: 279814
* [clang-tidy] Added hh, hxx and hpp to header guard checks.Mads Ravn2016-08-267-9/+62
| | | | | | | | Changed the extension check to include the option of ",h,hh,hpp,hxx" instead of just returning whether the file ended with ".h". Differential revision: https://reviews.llvm.org/D20512 llvm-svn: 279803
* [clang-tidy misc-move-const-arg] more specific messages + suggest ↵Alexander Kornienko2016-08-242-10/+15
| | | | | | alternative solution llvm-svn: 279666
* Clang-tidy documentation style. Two Google checks are aliases.Eugene Zelenko2016-08-248-36/+29
| | | | | | Differential revision: https://reviews.llvm.org/D23815 llvm-svn: 279659
* [Documentation] Fix style of Clang-tidy readability-non-const-parameter.Eugene Zelenko2016-08-231-7/+9
| | | | llvm-svn: 279541
* [clang-tidy] Merge ExtraArgs(Before) instead of overriding them.Alexander Kornienko2016-08-232-24/+63
| | | | | | Added proper tests. llvm-svn: 279519
* [clang-tidy] Fix the order of ExtraArgsBeforeAlexander Kornienko2016-08-233-4/+30
| | | | | | Added tests for the relative order of -extra-arg(-before) and ExtraArgs(Before). llvm-svn: 279516
* [clang-tidy] readability-non-const-parameter: add new check that warns when ↵Daniel Marjamaki2016-08-238-0/+612
| | | | | | | | | | | | | | function parameters should be const The check will warn when the constness will make the function interface safer. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D15332 llvm-svn: 279507
* Fix style in some Clang-tidy checks documentation.Eugene Zelenko2016-08-237-42/+70
| | | | | | Differential revision: https://reviews.llvm.org/D23728 llvm-svn: 279494
* [clang-tidy docs] Further cleanup of optionsAlexander Kornienko2016-08-225-28/+41
| | | | llvm-svn: 279442
* minor header guards and help messages cleanupKirill Bobyrev2016-08-194-8/+8
| | | | llvm-svn: 279226
* [Documentation] Fixed style in modernize-use-emplace.rst.Eugene Zelenko2016-08-181-4/+3
| | | | llvm-svn: 279170
* [clang-tidy docs] Move option descriptions to the Options sectionAlexander Kornienko2016-08-183-22/+37
| | | | | | + random fixes llvm-svn: 279115
* [clang-tidy docs] Minor fixAlexander Kornienko2016-08-181-1/+1
| | | | llvm-svn: 279051
* [clang-tidy docs] Fix formatting.Alexander Kornienko2016-08-181-0/+1
| | | | llvm-svn: 279050
* [clang-tidy docs] Fix build errors on Sphinx 1.4.5Alexander Kornienko2016-08-188-48/+86
| | | | llvm-svn: 279049
* [Release notes] Mention Emacs integration in Include-fixer.Eugene Zelenko2016-08-171-1/+1
| | | | llvm-svn: 279009
* [Documentation] Remove duplicated checks groups descriptions from ↵Eugene Zelenko2016-08-171-23/+9
| | | | | | | | clang-tidy/index.rst. Differential revision: https://reviews.llvm.org/D23596 llvm-svn: 279006
* Revert "Add a test for clang-tidy using the clang-cl driver."Zachary Turner2016-08-171-17/+0
| | | | | | | | | | This reverts commit fd1908ce445eba4544d64cc68b3c03249e4bf614. This should be the correct CL to revert. The clang-side patch that enabled this functionality was reverted, so this test needs to be reverted until it gets fixed. llvm-svn: 278979
* Revert "Revert "[Include-fixer] Install executables and support scripts""Zachary Turner2016-08-172-3/+25
| | | | | | | | | This reverts commit 2aff596257e1c45fa54baae823ecbe61a785174e. I'm having a bad day apparently. I reverted the wrong CL. This puts it back. llvm-svn: 278978
OpenPOWER on IntegriCloud