Alexander Kornienko
ab2d3ce47d
[clang-tidy] Applied clang-tidy fixes. NFC
...
Applied fixes enabled by the LLVM's .clang-tidy configs. Reverted files where
fixes introduced compile errors:
clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.cpp
clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
$ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -fix clang-tools-extra/clang-tidy/
Enabled checks:
llvm-else-after-return
llvm-header-guard
llvm-include-order
llvm-namespace-comment
llvm-prefer-isa-or-dyn-cast-in-conditionals
llvm-prefer-register-over-unsigned
llvm-qualified-auto
llvm-twine-local
misc-definitions-in-headers
misc-misplaced-const
misc-new-delete-overloads
misc-no-recursion
misc-non-copyable-objects
misc-redundant-expression
misc-static-assert
misc-throw-by-value-catch-by-reference
misc-unconventional-assign-operator
misc-uniqueptr-reset-release
misc-unused-alias-decls
misc-unused-using-decls
readability-identifier-naming
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D95614
2021-01-29 01:01:19 +01:00
Nathan James
e40a742a50
[clang-tidy] Change checks to use new isLanguageVersionSupported restriction
...
Summary: Modifies all checks that are language version dependent to use `isLanguageVersionSupported`
Reviewers: jdoerfert, lebedev.ri, aaron.ballman, gribozavr2, Eugene.Zelenko
Reviewed By: gribozavr2
Subscribers: wuzish, nemanjai, xazax.hun, hiraditya, kbarton, steven_wu, dexonsmith, arphaman, lebedev.ri, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75340
2020-03-03 16:43:45 +00:00
Chandler Carruth
2946cd7010
Update the file headers across all of the LLVM projects in the monorepo
...
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
2019-01-19 08:50:56 +00:00
Stephen Kelly
c09197e086
Port getLocEnd -> getEndLoc
...
Subscribers: nemanjai, ioeric, kbarton, cfe-commits
Differential Revision: https://reviews.llvm.org/D50355
llvm-svn: 339401
2018-08-09 22:43:02 +00:00
Alexander Kornienko
04e5ab3501
[clang-tidy] Fix google-explicit-constructor issue with out-of-line conversions
...
llvm-svn: 300569
2017-04-18 17:26:00 +00:00
Alexander Kornienko
c7c9b75804
[clang-tidy] Verify some conditions in a matcher instead of check(). NFC
...
llvm-svn: 298057
2017-03-17 09:47:05 +00:00
Alexander Kornienko
7bcf7516df
[clang-tidy] Ignore deleted members in google-explicit-constructor.
...
This fixes http://llvm.org/PR32221 .
llvm-svn: 298052
2017-03-17 08:40:07 +00:00
Alexander Kornienko
2042f833fd
[clang-tidy] google-explicit-constructor: ignore macros
...
llvm-svn: 290756
2016-12-30 15:15:14 +00:00
Alexander Kornienko
56d0806644
[clang-tidy] google-explicit-constructor: ignore template instantiations
...
llvm-svn: 290753
2016-12-30 13:25:03 +00:00
Alexander Kornienko
dd0c0ba82c
[clang-tidy] google-explicit-constructor: ignore compiler-generated conversion operators.
...
llvm-svn: 290668
2016-12-28 13:48:03 +00:00
Alexander Kornienko
bbd8536321
[clang-tidy] Flag implicit conversion operators.
...
llvm-svn: 290434
2016-12-23 15:03:12 +00:00
Piotr Padlewski
08124b110a
modernize-use-auto NFC fixes
...
llvm-svn: 289656
2016-12-14 15:29:23 +00:00
Gabor Horvath
afad84c04b
[clang-tidy] Cleaning up language options.
...
Differential Revision: https://reviews.llvm.org/D24881
llvm-svn: 282319
2016-09-24 02:13:45 +00:00
Benjamin Kramer
51a9cc9ce7
Apply performance-unnecessary-value-param to clang-tidy.
...
With minor manual tweaks. No functionality change intended.
llvm-svn: 272795
2016-06-15 15:46:10 +00:00
Alexander Kornienko
5eb134cc20
[clang-tidy] google-explicit-constructor: improve the warning message
...
Also switch some more tests to %check_clang_tidy.
llvm-svn: 254216
2015-11-28 02:25:02 +00:00
Aaron Ballman
b9ea09c445
Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang.
...
llvm-svn: 247886
2015-09-17 13:31:25 +00:00
Aaron Ballman
ec3e5d6fd8
Disable clang-tidy Google checkers when not compiling in C++ mode. None of 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
2015-09-02 16:20:42 +00:00
Alexander Kornienko
0b024619df
[clang-tidy] Clarify message for the google-explicit-constructor check
...
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
2015-03-31 16:24:44 +00:00
Benjamin Kramer
e71037123b
Make helpers static. clang-tools edition.
...
Also purge dead code found by it. NFC.
llvm-svn: 232948
2015-03-23 12:49:15 +00:00
Alexander Kornienko
ed824e0e4b
[clang-tidy] Refactor: Move google clang-tidy checks to namespace clang::tidy::google
...
http://reviews.llvm.org/D7994
Patch by Richard Thomson!
llvm-svn: 231364
2015-03-05 13:46:14 +00:00
Alexander Kornienko
dd2dad0d24
[clang-tidy] Detect dependent initializer_lists in google-explicit-constructor.
...
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
2015-02-05 12:49:07 +00:00
Alexander Kornienko
ad5074df0c
[clang-tidy] google-explicit-constructor: don't match in template instantiations
...
This helps avoiding false positives related to the recently added
std::initializer_list<> handling.
llvm-svn: 222981
2014-11-30 19:41:41 +00:00
Alexander Kornienko
15c5e6a597
[clang-tidy] Support initializer_list in google-explicit-constructor check
...
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
2014-11-27 11:11:47 +00:00
Alexander Kornienko
72f1e754a7
Move google-explicit-constructor check to a separate source file.
...
Summary: No functional changes.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4188
llvm-svn: 211154
2014-06-18 09:33:46 +00:00