2015-10-02 21:27:19 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS support)
|
|
|
|
|
|
|
|
add_clang_library(clangTidyCERTModule
|
|
|
|
CERTTidyModule.cpp
|
2016-02-23 00:01:06 +08:00
|
|
|
CommandProcessorCheck.cpp
|
2017-02-17 16:52:51 +08:00
|
|
|
DontModifyStdNamespaceCheck.cpp
|
2016-02-19 22:03:20 +08:00
|
|
|
FloatLoopCounter.cpp
|
2016-11-02 22:16:36 +08:00
|
|
|
LimitedRandomnessCheck.cpp
|
2017-05-10 19:16:55 +08:00
|
|
|
PostfixOperatorCheck.cpp
|
2018-07-05 09:16:31 +08:00
|
|
|
ProperlySeededRandomGeneratorCheck.cpp
|
2015-10-09 03:54:43 +08:00
|
|
|
SetLongJmpCheck.cpp
|
2015-12-01 22:05:39 +08:00
|
|
|
StaticObjectExceptionCheck.cpp
|
2016-04-30 04:56:48 +08:00
|
|
|
StrToNumCheck.cpp
|
2015-11-17 03:17:43 +08:00
|
|
|
ThrownExceptionTypeCheck.cpp
|
2015-10-06 04:08:59 +08:00
|
|
|
VariadicFunctionDefCheck.cpp
|
2015-10-02 21:27:19 +08:00
|
|
|
|
|
|
|
LINK_LIBS
|
|
|
|
clangAST
|
|
|
|
clangASTMatchers
|
|
|
|
clangBasic
|
|
|
|
clangLex
|
|
|
|
clangTidy
|
2019-05-24 04:29:04 +08:00
|
|
|
clangTidyBugproneModule
|
2015-10-02 22:01:55 +08:00
|
|
|
clangTidyGoogleModule
|
|
|
|
clangTidyMiscModule
|
2017-11-27 23:17:13 +08:00
|
|
|
clangTidyPerformanceModule
|
[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
|
|
|
clangTidyReadabilityModule
|
2015-12-01 22:05:39 +08:00
|
|
|
clangTidyUtils
|
2015-10-02 21:27:19 +08:00
|
|
|
)
|