2014-09-22 18:41:39 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS support)
|
|
|
|
|
2014-10-26 09:41:14 +08:00
|
|
|
add_clang_library(clangTidyReadabilityModule
|
2016-03-30 19:31:33 +08:00
|
|
|
AvoidConstParamsInDecls.cpp
|
2014-10-15 18:51:57 +08:00
|
|
|
BracesAroundStatementsCheck.cpp
|
2018-11-01 03:11:38 +08:00
|
|
|
ConstReturnTypeCheck.cpp
|
2015-03-09 20:18:39 +08:00
|
|
|
ContainerSizeEmptyCheck.cpp
|
2016-12-31 20:45:59 +08:00
|
|
|
DeleteNullPointerCheck.cpp
|
2016-04-13 19:33:40 +08:00
|
|
|
DeletedDefaultCheck.cpp
|
2015-01-15 03:37:54 +08:00
|
|
|
ElseAfterReturnCheck.cpp
|
2015-03-09 20:18:39 +08:00
|
|
|
FunctionSizeCheck.cpp
|
2015-08-19 19:15:36 +08:00
|
|
|
IdentifierNamingCheck.cpp
|
2017-08-08 22:53:52 +08:00
|
|
|
ImplicitBoolConversionCheck.cpp
|
2015-09-10 18:07:11 +08:00
|
|
|
InconsistentDeclarationParameterNameCheck.cpp
|
[clang-tidy] new check 'readability-isolate-declaration'
Summary:
This patch introduces a new clang-tidy check that matches on all `declStmt` that declare more then one variable
and transform them into one statement per declaration if possible.
It currently only focusses on variable declarations but should be extended to cover more kinds of declarations in the future.
It is related to https://reviews.llvm.org/D27621 and does use it's extensive test-suite. Thank you to firolino for his work!
Reviewers: rsmith, aaron.ballman, alexfh, hokein, kbobyrev
Reviewed By: aaron.ballman
Subscribers: ZaMaZaN4iK, mgehre, nemanjai, kbarton, lebedev.ri, Eugene.Zelenko, mgorny, xazax.hun, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D51949
llvm-svn: 345735
2018-11-01 00:50:44 +08:00
|
|
|
IsolateDeclarationCheck.cpp
|
2018-08-12 22:35:13 +08:00
|
|
|
MagicNumbersCheck.cpp
|
2017-02-14 18:03:27 +08:00
|
|
|
MisleadingIndentationCheck.cpp
|
2016-09-12 20:04:13 +08:00
|
|
|
MisplacedArrayIndexCheck.cpp
|
2015-03-17 06:31:16 +08:00
|
|
|
NamedParameterCheck.cpp
|
2014-09-22 18:41:39 +08:00
|
|
|
NamespaceCommentCheck.cpp
|
2016-08-23 18:09:08 +08:00
|
|
|
NonConstParameterCheck.cpp
|
2014-10-26 09:41:14 +08:00
|
|
|
ReadabilityTidyModule.cpp
|
2016-02-01 23:31:15 +08:00
|
|
|
RedundantControlFlowCheck.cpp
|
2016-11-01 21:26:15 +08:00
|
|
|
RedundantDeclarationCheck.cpp
|
2016-12-13 16:04:11 +08:00
|
|
|
RedundantFunctionPtrDereferenceCheck.cpp
|
2016-10-21 00:08:03 +08:00
|
|
|
RedundantMemberInitCheck.cpp
|
2019-01-11 15:59:47 +08:00
|
|
|
RedundantPreprocessorCheck.cpp
|
2015-03-09 20:18:39 +08:00
|
|
|
RedundantSmartptrGetCheck.cpp
|
2018-09-20 08:02:55 +08:00
|
|
|
RedundantStringCStrCheck.cpp
|
2016-02-26 07:57:23 +08:00
|
|
|
RedundantStringInitCheck.cpp
|
2015-04-11 03:26:43 +08:00
|
|
|
SimplifyBooleanExprCheck.cpp
|
2018-05-17 04:12:06 +08:00
|
|
|
SimplifySubscriptExprCheck.cpp
|
2017-08-08 23:33:48 +08:00
|
|
|
StaticAccessedThroughInstanceCheck.cpp
|
2016-04-05 19:42:08 +08:00
|
|
|
StaticDefinitionInAnonymousNamespaceCheck.cpp
|
2018-01-30 22:55:50 +08:00
|
|
|
StringCompareCheck.cpp
|
2015-10-20 05:49:51 +08:00
|
|
|
UniqueptrDeleteReleaseCheck.cpp
|
[clang-tidy] Re-commit: Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)
Summary:
Detects when the integral literal or floating point (decimal or hexadecimal)
literal has non-uppercase suffix, and suggests to make the suffix uppercase,
with fix-it.
All valid combinations of suffixes are supported.
```
auto x = 1; // OK, no suffix.
auto x = 1u; // warning: integer literal suffix 'u' is not upper-case
auto x = 1U; // OK, suffix is uppercase.
...
```
This is a re-commit, the original was reverted by me in
rL345305 due to discovered bugs. (implicit code, template instantiation)
Tests were added, and the bugs were fixed.
I'm unable to find any further bugs, hopefully there aren't any..
References:
* [[ https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pageId=87152241 | CERT DCL16-C ]]
* MISRA C:2012, 7.3 - The lowercase character "l" shall not be used in a literal suffix
* MISRA C++:2008, 2-13-4 - Literal suffixes shall be upper case
Reviewers: JonasToth, aaron.ballman, alexfh, hokein, xazax.hun
Reviewed By: aaron.ballman
Subscribers: Eugene.Zelenko, mgorny, rnkovacs, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D52670
llvm-svn: 345381
2018-10-26 21:09:27 +08:00
|
|
|
UppercaseLiteralSuffixCheck.cpp
|
2014-09-22 18:41:39 +08:00
|
|
|
|
|
|
|
LINK_LIBS
|
|
|
|
clangAST
|
|
|
|
clangASTMatchers
|
|
|
|
clangBasic
|
|
|
|
clangLex
|
|
|
|
clangTidy
|
2016-04-22 08:33:39 +08:00
|
|
|
clangTidyUtils
|
2014-09-22 18:41:39 +08:00
|
|
|
clangTooling
|
|
|
|
)
|