2020-04-08 00:26:40 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
|
|
|
FrontendOpenMP
|
|
|
|
Support
|
|
|
|
)
|
2013-07-29 16:19:24 +08:00
|
|
|
|
|
|
|
add_clang_library(clangTidyLLVMModule
|
2014-08-13 21:57:57 +08:00
|
|
|
HeaderGuardCheck.cpp
|
2014-05-20 00:39:08 +08:00
|
|
|
IncludeOrderCheck.cpp
|
2013-07-29 16:19:24 +08:00
|
|
|
LLVMTidyModule.cpp
|
[clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals
Summary:
Looks at conditionals and finds cases of ``cast<>``, which will
assert rather than return a null pointer, and ``dyn_cast<>`` where
the return value is not captured. Additionally, finds cases that
match the pattern ``var.foo() && isa<X>(var.foo())``, where the
method is called twice and could be expensive.
.. code-block:: c++
// Finds cases like these:
if (auto x = cast<X>(y)) <...>
if (cast<X>(y)) <...>
// But not cases like these:
if (auto f = cast<Z>(y)->foo()) <...>
if (cast<Z>(y)->foo()) <...>
Reviewers: alexfh, rjmccall, hokein, aaron.ballman, JonasToth
Reviewed By: aaron.ballman
Subscribers: xbolva00, Eugene.Zelenko, mgorny, xazax.hun, cfe-commits
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D59802
llvm-svn: 359142
2019-04-25 05:25:57 +08:00
|
|
|
PreferIsaOrDynCastInConditionalsCheck.cpp
|
[clang-tidy] Add llvm-prefer-register-over-unsigned to clang-tidy
Summary:
This clang-tidy check is looking for unsigned integer variables whose initializer
starts with an implicit cast from llvm::Register and changes the type of the
variable to llvm::Register (dropping the llvm:: where possible).
Reviewers: arsenm, bogner
Subscribers: jholewinski, MatzeB, qcolombet, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, wdng, nhaehnle, mgorny, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, javed.absar, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, tpr, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, Jim, s.egerton, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D65919
llvm-svn: 370512
2019-08-31 04:01:59 +08:00
|
|
|
PreferRegisterOverUnsignedCheck.cpp
|
2014-07-08 22:32:17 +08:00
|
|
|
TwineLocalCheck.cpp
|
2014-02-26 14:41:29 +08:00
|
|
|
|
|
|
|
LINK_LIBS
|
2020-06-17 02:43:55 +08:00
|
|
|
clangTidy
|
|
|
|
clangTidyReadabilityModule
|
|
|
|
clangTidyUtils
|
2020-06-23 23:48:04 +08:00
|
|
|
|
|
|
|
DEPENDS
|
|
|
|
omp_gen
|
2020-06-17 02:43:55 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
clang_target_link_libraries(clangTidyLLVMModule
|
|
|
|
PRIVATE
|
2013-12-10 09:41:10 +08:00
|
|
|
clangAST
|
2013-07-29 16:19:24 +08:00
|
|
|
clangASTMatchers
|
2013-12-10 09:41:10 +08:00
|
|
|
clangBasic
|
|
|
|
clangLex
|
2014-08-14 06:12:28 +08:00
|
|
|
clangTooling
|
2013-07-29 16:19:24 +08:00
|
|
|
)
|