2015-08-14 21:17:11 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS support)
|
|
|
|
|
|
|
|
add_clang_library(clangTidyModernizeModule
|
2016-05-13 04:06:04 +08:00
|
|
|
AvoidBindCheck.cpp
|
[clang-tidy] Avoid C arrays check
Summary:
[[ https://bugs.llvm.org/show_bug.cgi?id=39224 | PR39224 ]]
As discussed, we can't always do the transform automatically due to that array-to-pointer decay of C array.
In order to detect whether we can do said transform, we'd need to be able to see all usages of said array,
which is, i would say, rather impossible if e.g. it is in the header.
Thus right now no fixit exists.
Exceptions: `extern "C"` code.
References:
* [[ https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es27-use-stdarray-or-stack_array-for-arrays-on-the-stack | CPPCG ES.27: Use std::array or stack_array for arrays on the stack ]]
* [[ https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#slcon1-prefer-using-stl-array-or-vector-instead-of-a-c-array | CPPCG SL.con.1: Prefer using STL array or vector instead of a C array ]]
* HICPP `4.1.1 Ensure that a function argument does not undergo an array-to-pointer conversion`
* MISRA `5-2-12 An identifier with array type passed as a function argument shall not decay to a pointer`
Reviewers: aaron.ballman, JonasToth, alexfh, hokein, xazax.hun
Reviewed By: JonasToth
Subscribers: Eugene.Zelenko, mgorny, rnkovacs, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D53771
llvm-svn: 346835
2018-11-14 17:01:08 +08:00
|
|
|
AvoidCArraysCheck.cpp
|
2018-09-26 02:12:28 +08:00
|
|
|
ConcatNestedNamespacesCheck.cpp
|
2016-02-24 21:36:34 +08:00
|
|
|
DeprecatedHeadersCheck.cpp
|
2018-10-05 21:36:00 +08:00
|
|
|
DeprecatedIosBaseAliasesCheck.cpp
|
2015-08-19 17:11:46 +08:00
|
|
|
LoopConvertCheck.cpp
|
|
|
|
LoopConvertUtils.cpp
|
2016-05-03 00:56:39 +08:00
|
|
|
MakeSharedCheck.cpp
|
2018-09-20 08:02:55 +08:00
|
|
|
MakeSmartPtrCheck.cpp
|
2015-09-29 17:36:41 +08:00
|
|
|
MakeUniqueCheck.cpp
|
2015-08-14 21:17:11 +08:00
|
|
|
ModernizeTidyModule.cpp
|
|
|
|
PassByValueCheck.cpp
|
2016-03-28 00:43:44 +08:00
|
|
|
RawStringLiteralCheck.cpp
|
2015-10-28 09:36:20 +08:00
|
|
|
RedundantVoidArgCheck.cpp
|
2015-08-25 21:03:43 +08:00
|
|
|
ReplaceAutoPtrCheck.cpp
|
2017-04-24 17:27:20 +08:00
|
|
|
ReplaceRandomShuffleCheck.cpp
|
2017-02-16 01:06:06 +08:00
|
|
|
ReturnBracedInitListCheck.cpp
|
2015-08-31 21:17:43 +08:00
|
|
|
ShrinkToFitCheck.cpp
|
2017-07-12 21:43:35 +08:00
|
|
|
UnaryStaticAssertCheck.cpp
|
2015-08-21 23:08:51 +08:00
|
|
|
UseAutoCheck.cpp
|
2016-05-11 19:33:16 +08:00
|
|
|
UseBoolLiteralsCheck.cpp
|
2016-12-21 05:26:07 +08:00
|
|
|
UseDefaultMemberInitCheck.cpp
|
2016-06-21 23:23:27 +08:00
|
|
|
UseEmplaceCheck.cpp
|
2016-12-02 01:24:42 +08:00
|
|
|
UseEqualsDefaultCheck.cpp
|
2016-11-11 00:46:59 +08:00
|
|
|
UseEqualsDeleteCheck.cpp
|
[clang-tidy] Adding a new modernize use nodiscard checker
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
2019-01-10 04:50:50 +08:00
|
|
|
UseNodiscardCheck.cpp
|
[clang-tidy] New checker to replace dynamic exception specifications
Summary:
New checker to replace dynamic exception
specifications
This is an alternative to D18575 which relied on reparsing the decl to
find the location of dynamic exception specifications, but couldn't
deal with preprocessor conditionals correctly without reparsing the
entire file.
This approach uses D20428 to find dynamic exception specification
locations and handles all cases correctly.
Reviewers: aaron.ballman, alexfh
Reviewed By: aaron.ballman, alexfh
Subscribers: xazax.hun, mgehre, malcolm.parsons, mgorny, JDevlieghere, cfe-commits, Eugene.Zelenko, etienneb
Patch by Don Hinton!
Differential Revision: https://reviews.llvm.org/D20693
llvm-svn: 304977
2017-06-08 22:04:16 +08:00
|
|
|
UseNoexceptCheck.cpp
|
2015-08-20 06:21:37 +08:00
|
|
|
UseNullptrCheck.cpp
|
2015-08-31 21:17:43 +08:00
|
|
|
UseOverrideCheck.cpp
|
2016-11-16 22:42:10 +08:00
|
|
|
UseTransparentFunctorsCheck.cpp
|
2018-02-20 18:48:38 +08:00
|
|
|
UseUncaughtExceptionsCheck.cpp
|
2016-06-26 02:37:53 +08:00
|
|
|
UseUsingCheck.cpp
|
2015-08-14 21:17:11 +08:00
|
|
|
|
|
|
|
LINK_LIBS
|
|
|
|
clangAST
|
|
|
|
clangASTMatchers
|
|
|
|
clangBasic
|
|
|
|
clangLex
|
|
|
|
clangTidy
|
|
|
|
clangTidyReadabilityModule
|
2015-08-15 09:32:15 +08:00
|
|
|
clangTidyUtils
|
2018-04-11 04:07:06 +08:00
|
|
|
clangTooling
|
2015-08-14 21:17:11 +08:00
|
|
|
)
|