summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/google
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-tidy] google-explicit-constructor: ignore macrosAlexander Kornienko2016-12-301-0/+4
| | | | llvm-svn: 290756
* [clang-tidy] google-explicit-constructor: ignore template instantiationsAlexander Kornienko2016-12-301-2/+4
| | | | llvm-svn: 290753
* [clang-tidy] google-explicit-constructor: ignore compiler-generated ↵Alexander Kornienko2016-12-281-2/+5
| | | | | | conversion operators. llvm-svn: 290668
* [clang-tidy] Flag implicit conversion operators.Alexander Kornienko2016-12-231-9/+21
| | | | llvm-svn: 290434
* modernize-use-auto NFC fixesPiotr Padlewski2016-12-142-3/+2
| | | | llvm-svn: 289656
* [clang-tools-extra] Format sources with clang-format. NFC.Mandeep Singh Grang2016-11-0811-49/+48
| | | | | | | | | | | | | | | | Summary: Ran clang-format on all .c/.cpp/.h files in clang-tools-extra. Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories. Reviewers: klimek, alexfh Subscribers: nemanjai Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D26329 llvm-svn: 286221
* [clang-tidy] Add a whitelist option in google-runtime-references.Haojian Wu2016-10-102-2/+29
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25244 llvm-svn: 283777
* [clang-tidy] Cleaning up language options.Gabor Horvath2016-09-242-5/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D24881 llvm-svn: 282319
* Apply performance-unnecessary-value-param to clang-tidy.Benjamin Kramer2016-06-151-1/+2
| | | | | | With minor manual tweaks. No functionality change intended. llvm-svn: 272795
* [clang-tidy] Fix/add style guide links.Alexander Kornienko2016-05-191-1/+1
| | | | | | Thanks to Tim Halloran for the initial patch (http://reviews.llvm.org/D15089)! llvm-svn: 270033
* [clang-tidy] new google-default-arguments checkHaojian Wu2016-05-094-0/+74
| | | | | | | | | | | | | | | | Summary: To check the google style guide rule here: https://google.github.io/styleguide/cppguide.html#Default_Arguments Patch by Clement Courbet! Reviewers: hokein Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19534 llvm-svn: 268919
* [clang-tidy] Remove unnecessary getName() on Decls and Types feeding into a ↵Benjamin Kramer2016-04-071-2/+2
| | | | | | | | | | DiagnosticBuilder Going through a string removes some of the smarts of the diagnosic printer and makes the code more complicated. This change has some cosmetic impact on the output but that's mostly minor. llvm-svn: 265680
* [clang-tidy] update links to Google Code Style in docsHaojian Wu2016-02-255-5/+5
| | | | | | | | | | | | | | Summary: Because of the recent Google Code shutdown links to the Google Code Style up there are no longer relevant. Reviewers: alexfh, hokein Subscribers: cfe-commits Patch by Kirill Bobyrev! Differential Revision: http://reviews.llvm.org/D17602 llvm-svn: 261868
* [clang-tidy] google-runtime-int: fix a false positive in implicit code.Alexander Kornienko2016-02-112-3/+41
| | | | llvm-svn: 260535
* Unbreak the cmake shared build.Benjamin Kramer2016-02-051-0/+1
| | | | llvm-svn: 259880
* [clang-tdiy] Add header file extension configuration support.Haojian Wu2016-02-054-16/+70
| | | | | | | | | | | | Summary: * Add a `HeaderFileExtensions` check option in misc-definitions-in-headers, google-build-namespaces and google-global-names-in-headers. Reviewers: aaron.ballman, alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16113 llvm-svn: 259879
* [clang-tidy] More friendly warning in "google-runtime-references" when ↵Haojian Wu2016-02-041-3/+10
| | | | | | | | | | | | meeting an unnamed function parameter. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16882 llvm-svn: 259787
* [clang-tidy] Add non-constant references in function parameters check.Alexander Kornienko2016-02-024-0/+159
| | | | | | | | | | | | | | | Summary: This is implemented originally by Alexander Kornienko. Reviewers: alexfh Subscribers: cfe-commits Patch by Haojian Wu! Differential Revision: http://reviews.llvm.org/D16717 llvm-svn: 259530
* Remove autoconf supportChris Bieneman2016-01-261-12/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "Now I am become Death, the destroyer of worlds." -J. Robert Oppenheimer Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D16475 llvm-svn: 258864
* [clang-tidy] Fix a false positive in google-runtime-memsetAlexander Kornienko2016-01-111-7/+11
| | | | | | | | | | | | | | | | | google-runtime-memset no longer issues a warning if the fill char value is known to be an invalid fill char count. Namely, it no longer warns for these: memset(p, 0, 0); memset(p, -1, 0); In both cases, swapping the last two args would either be useless (there is no actual bug) or wrong (it would introduce a bug). Patch by Matt Armstrong! llvm-svn: 257320
* [clang-tidy] Use proper capitalization and punctuation for diagnostic messages.Alexander Kornienko2016-01-084-8/+8
| | | | | | Use diagnostic parameters where possible instead of string concatenation. llvm-svn: 257176
* [clang-tidy] google-explicit-constructor: improve the warning messageAlexander Kornienko2015-11-281-3/+5
| | | | | | Also switch some more tests to %check_clang_tidy. llvm-svn: 254216
* Refactors AST matching code to use the new AST matcher names. This patch ↵Aaron Ballman2015-09-172-6/+7
| | | | | | correlates to r247885 which performs the AST matcher rename in Clang. llvm-svn: 247886
* [clang-tidy] google-runtime-int: made the matcher more restricting, added a ↵Alexander Kornienko2015-09-161-1/+1
| | | | | | | | test for a false positive This should be NFC. llvm-svn: 247806
* [clang-tidy] Make google-runtime-int configurable.Alexander Kornienko2015-09-162-7/+19
| | | | llvm-svn: 247803
* Disable clang-tidy Google checkers when not compiling in C++ mode. None of ↵Aaron Ballman2015-09-027-11/+32
| | | | | | the checkers require additional testing as the tests will not compile for other languages or modes, or the checkers would never match a valid construct. llvm-svn: 246663
* [clang-tidy] Update docs for clang-tidy checks. NFCAlexander Kornienko2015-08-2710-29/+43
| | | | | | | | | | | Changes mostly address formatting and unification of the style. Use MarkDown style for inline code snippets and lists. Added some text for a few checks. The idea is to move most of the documentation out to separate rST files and have implementation files refer to the corresponding documentation files. llvm-svn: 246169
* We no longer need a custom matcher for this; use the builtin AST matcher ↵Aaron Ballman2015-08-181-8/+2
| | | | | | instead. NFC, and existing tests should cover this change. llvm-svn: 245340
* [clang-tidy] Move user-defined matches to unnamed namespaces to prevent ODR ↵Alexander Kornienko2015-06-172-5/+4
| | | | | | violations. llvm-svn: 239904
* [clang-tidy] Don't issue most google-readability-casting warnings on .c ↵Alexander Kornienko2015-05-261-8/+11
| | | | | | | | | files included in other files. This is done sometimes for testing purposes, and the check needs to handle this consistently. llvm-svn: 238193
* [clang-tidy] Disable google-readability-casting for .c files and their headers.Alexander Kornienko2015-05-211-0/+5
| | | | | | | | | Some people have reasons to compile their .c files as C++ in some configurations (e.g. for testing purposes), so just looking at LangOptions is not enough. This patch disables the check on all .c files (and also for the headers included from .c files). llvm-svn: 237905
* [clang-tidy] Clarify message for the google-explicit-constructor checkAlexander Kornienko2015-03-311-1/+5
| | | | | | | | Use "constructors that are callable with a single argument" instead of "single-argument constructors" when referring to constructors using default arguments or parameter packs. llvm-svn: 233702
* Fix false positive on anonymous namespaces in headers.Samuel Benzaquen2015-03-241-0/+10
| | | | | | | | | | | | | | | | Summary: Anynoumous namespaces inject a using directive into the AST to import the names into the containing namespace. We should not have them in headers, but there is another warning for that. Reviewers: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8443 llvm-svn: 233087
* Make helpers static. clang-tools edition.Benjamin Kramer2015-03-232-7/+7
| | | | | | Also purge dead code found by it. NFC. llvm-svn: 232948
* [clang-tidy] Move google-readability-function check to ↵Alexander Kornienko2015-03-164-168/+0
| | | | | | | | | | | | | | | | readability-named-parameter. Summary: The relevant style rule is going to be removed, thus the check is no longer needed in the Google module. Leaving the check in readability/ in case someone needs it. Reviewers: djasper Reviewed By: djasper Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D8261 llvm-svn: 232431
* [clang-tidy] Fixed header guards using clang-tidy llvm-header-guard check. NFC.Alexander Kornienko2015-03-0910-30/+30
| | | | | | | | | | The patch was generated using this command: $ clang-tidy/tool/run-clang-tidy.py -header-filter=.*clang-tidy.* -fix \ -checks=-*,llvm-header-guard clang-tidy.* $ svn revert --recursive clangt-tidy/llvm/ (to revert a few buggy fixes) llvm-svn: 231669
* [clang-tidy] Refactor: Rename clang-tidy readability check files and classes ↵Alexander Kornienko2015-03-091-3/+3
| | | | | | | | | | | | | to follow naming conventions Classes are named WhateverCheck, files are WhateverCheck.cpp and` WhateverCheck.h` http://reviews.llvm.org/D8144 Patch by Richard Thomson! llvm-svn: 231650
* [clang-tidy] Refactor: Move google clang-tidy checks to namespace ↵Alexander Kornienko2015-03-0525-8/+61
| | | | | | | | | | clang::tidy::google http://reviews.llvm.org/D7994 Patch by Richard Thomson! llvm-svn: 231364
* Add clang-tidy check google-global-names-in-headers.Samuel Benzaquen2015-02-114-0/+91
| | | | | | | | | | | | | | Summary: google-global-names-in-headers flags global namespace pollution in header files. Right now it only triggers on using declarations and directives. Reviewers: alexfh Subscribers: curdeius Differential Revision: http://reviews.llvm.org/D7563 llvm-svn: 228875
* [clang-tidy] Detect dependent initializer_lists in google-explicit-constructor.Alexander Kornienko2015-02-051-9/+16
| | | | | | | | | | | | | | | | Summary: Detect constructors taking a single std::initializer_list even when it is instantiation-dependent. Reviewers: djasper Reviewed By: djasper Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D7431 llvm-svn: 228289
* [clang-tidy] Fix some false positives in google-readability-castingAlexander Kornienko2015-01-291-6/+18
| | | | | | | | | | | | | | | | | Summary: Ignore C-style casts in extern "C" {} sections. Be more careful when detecting redundant casts between typedefs to the same type - emit a more specific warning and don't automatically fix them. Reviewers: klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D7247 llvm-svn: 227444
* [cleanup] Re-sort the #include lines with llvm/utils/sort_includes.pyChandler Carruth2015-01-149-12/+12
| | | | | | | No functionality changed, this is just a mechanical cleanup to keep the order of #include lines consistent across the project. llvm-svn: 225976
* [clang-tidy] google-runtime-int: Don't check C code.Alexander Kornienko2014-12-081-0/+4
| | | | llvm-svn: 223651
* [clang-tidy] google-explicit-constructor: don't match in template instantiationsAlexander Kornienko2014-11-301-1/+2
| | | | | | | This helps avoiding false positives related to the recently added std::initializer_list<> handling. llvm-svn: 222981
* [clang-tidy] Support initializer_list in google-explicit-constructor checkAlexander Kornienko2014-11-271-6/+34
| | | | | | | | | | | | | | | | | | | Summary: According to the Google C++ Style Guide, constructors taking a single std::initializer_list<> should not be marked explicit. This change also changes the messages according to conventions used in Clang diagnostics: no capitalization of the first letter, no trailing dot. Reviewers: djasper Reviewed By: djasper Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D6427 llvm-svn: 222878
* [clang-tidy] Set google-readability-namespace-comments.ShortNamespaceLines to 10Alexander Kornienko2014-11-201-1/+1
| | | | | | This value is used in cpplint, so we'd better be consistent. llvm-svn: 222431
* [clang-tidy] google-readability-function: skip std::nullptr_tAlexander Kornienko2014-11-051-0/+4
| | | | | | | Parameters of type std::nullptr_t can only have one value, so it doesn't make sense to name them. llvm-svn: 221340
* [clang-tidy] Bring order to check registration.Alexander Kornienko2014-10-262-3/+10
| | | | | | | | | | | | | | | | Summary: Register readability checks in a separate module. Renamed the checks and test file names accordingly. Reviewers: djasper, klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D5936 llvm-svn: 220631
* [clang-tidy] Default options in modules.Alexander Kornienko2014-10-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch allows modules to specify default options for the checks defined in them. This way a sufficiently configurable check can be registered in multiple modules with different default options. E.g. the SpacesBeforeComments option may be set to 1 for the "llvm-namespace-comments" check and to 2 for the "google-readability-namespace-comment" check without modifying or extending the check code. This patch also registers the google-readability-braces-around-statements check with suitable defaults. Reviewers: djasper Reviewed By: djasper Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D5798 llvm-svn: 219923
* [clang-tidy] Allow space between "TODO" and "(user)"Alexander Kornienko2014-10-051-1/+1
| | | | llvm-svn: 219091
OpenPOWER on IntegriCloud