2013-07-29 16:19:24 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
2013-12-10 03:27:57 +08:00
|
|
|
Support
|
2013-07-29 16:19:24 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
add_clang_library(clangTidy
|
|
|
|
ClangTidy.cpp
|
2019-03-25 20:36:30 +08:00
|
|
|
ClangTidyCheck.cpp
|
2013-07-29 16:19:24 +08:00
|
|
|
ClangTidyModule.cpp
|
2014-01-10 00:31:25 +08:00
|
|
|
ClangTidyDiagnosticConsumer.cpp
|
2014-05-23 00:07:11 +08:00
|
|
|
ClangTidyOptions.cpp
|
[clang-tidy] Profile is a per-AST (per-TU) data.
Summary:
As discussed in D45931, currently, profiling output of clang-tidy is somewhat not great.
It outputs one profile at the end of the execution, and that profile contains the data
from the last TU that was processed. So if the tool run on multiple TU's, the data is
not accumulated, it is simply discarded.
It would be nice to improve this.
This differential is the first step - make this profiling info per-TU,
and output it after the tool has finished processing each TU.
In particular, when `ClangTidyASTConsumer` destructor runs.
Next step will be to add a CSV (JSON?) printer to store said profiles under user-specified directory prefix.
Reviewers: alexfh, sbenza
Reviewed By: alexfh
Subscribers: Eugene.Zelenko, mgorny, xazax.hun, mgrang, klimek, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D46504
llvm-svn: 331763
2018-05-08 21:14:21 +08:00
|
|
|
ClangTidyProfiling.cpp
|
2019-03-22 21:42:48 +08:00
|
|
|
ExpandModularHeadersPPCallbacks.cpp
|
2019-08-26 23:44:32 +08:00
|
|
|
GlobList.cpp
|
2014-02-23 21:43:01 +08:00
|
|
|
|
|
|
|
DEPENDS
|
|
|
|
ClangSACheckers
|
2014-02-26 14:41:29 +08:00
|
|
|
|
|
|
|
LINK_LIBS
|
2013-12-10 09:41:10 +08:00
|
|
|
clangAST
|
|
|
|
clangASTMatchers
|
2013-07-29 16:19:24 +08:00
|
|
|
clangBasic
|
2016-10-18 01:25:02 +08:00
|
|
|
clangFormat
|
2013-12-10 09:41:10 +08:00
|
|
|
clangFrontend
|
2015-08-11 21:11:29 +08:00
|
|
|
clangLex
|
2014-07-17 00:50:17 +08:00
|
|
|
clangRewrite
|
2014-07-14 13:01:53 +08:00
|
|
|
clangSema
|
2018-12-12 16:25:16 +08:00
|
|
|
clangSerialization
|
2013-12-10 09:41:10 +08:00
|
|
|
clangTooling
|
2014-10-30 08:44:01 +08:00
|
|
|
clangToolingCore
|
2013-07-29 16:19:24 +08:00
|
|
|
)
|
|
|
|
|
2018-10-02 04:24:22 +08:00
|
|
|
if(CLANG_ENABLE_STATIC_ANALYZER)
|
|
|
|
target_link_libraries(clangTidy PRIVATE
|
|
|
|
clangStaticAnalyzerCore
|
|
|
|
clangStaticAnalyzerFrontend
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
[clang-tidy][Part1] Add a new module Android and three new checks.
Summary:
A common source of security bugs is code that opens a file descriptors without using the O_CLOEXEC flag. (Without that flag, an opened sensitive file would remain open across a fork+exec to a lower-privileged SELinux domain, leaking that sensitive data.).
Add a new Android module and one checks in clang-tidy.
-- open(), openat(), and open64() should include O_CLOEXEC in their flags argument. [android-file-open-flag]
Links to part2 and part3:
https://reviews.llvm.org/D33745
https://reviews.llvm.org/D33747
Reviewers: chh, alexfh, aaron.ballman, hokein
Reviewed By: alexfh, hokein
Subscribers: jbcoe, joerg, malcolm.parsons, Eugene.Zelenko, srhines, mgorny, xazax.hun, cfe-commits, krytarowski
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D33304
llvm-svn: 306165
2017-06-24 05:37:29 +08:00
|
|
|
add_subdirectory(android)
|
2018-03-09 18:47:14 +08:00
|
|
|
add_subdirectory(abseil)
|
2016-04-30 01:58:29 +08:00
|
|
|
add_subdirectory(boost)
|
2017-07-14 20:15:55 +08:00
|
|
|
add_subdirectory(bugprone)
|
2015-10-02 21:27:19 +08:00
|
|
|
add_subdirectory(cert)
|
2015-10-06 21:31:00 +08:00
|
|
|
add_subdirectory(cppcoreguidelines)
|
2017-11-29 05:09:25 +08:00
|
|
|
add_subdirectory(fuchsia)
|
2013-07-29 16:19:24 +08:00
|
|
|
add_subdirectory(google)
|
2017-03-20 01:23:23 +08:00
|
|
|
add_subdirectory(hicpp)
|
[clang-tidy] Add a module for the Linux kernel.
Summary:
Now that clang is going to be able to build the Linux kernel again on
x86, and we have gen_compile_commands.py upstream for generating
compile_commands.json, clang-tidy can be used on the Linux kernel
source.
To that end, this commit adds a new clang-tidy module to be used for
checks specific to Linux kernel source. The Linux kernel follows its own
style of C, and it will be useful to separate those checks into their
own module.
This also adds an initial check that makes sure that return values from
the kernel error functions like PTR_ERR and ERR_PTR are checked. It also
makes sure that any functions that directly return values from these
functions are checked.
Subscribers: xazax.hun, gribozavr, Eugene.Zelenko, lebedev.ri, mgorny, jdoerfert, cfe-commits
Tags: #clang, #clang-tools-extra
Reviewers: aaron.ballman, alexfh, hokein, JonasToth
Differential Revision: https://reviews.llvm.org/D59963
llvm-svn: 367071
2019-07-26 06:32:50 +08:00
|
|
|
add_subdirectory(linuxkernel)
|
2017-03-20 01:23:23 +08:00
|
|
|
add_subdirectory(llvm)
|
2014-03-05 21:14:32 +08:00
|
|
|
add_subdirectory(misc)
|
2015-08-14 21:17:11 +08:00
|
|
|
add_subdirectory(modernize)
|
2018-10-02 04:24:22 +08:00
|
|
|
if(CLANG_ENABLE_STATIC_ANALYZER)
|
|
|
|
add_subdirectory(mpi)
|
|
|
|
endif()
|
2017-10-26 16:23:20 +08:00
|
|
|
add_subdirectory(objc)
|
[clang-tidy] A new OpenMP module
Summary:
Just the empty skeleton.
Previously reviewed as part of D57113.
Reviewers: JonasToth, aaron.ballman, alexfh, xazax.hun, hokein, gribozavr
Reviewed By: JonasToth, gribozavr
Subscribers: jdoerfert, mgorny, rnkovacs, guansong, arphaman, cfe-commits
Tags: #clang-tools-extra, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D57571
llvm-svn: 356800
2019-03-23 03:46:01 +08:00
|
|
|
add_subdirectory(openmp)
|
2015-12-30 18:24:40 +08:00
|
|
|
add_subdirectory(performance)
|
2017-03-20 01:23:23 +08:00
|
|
|
add_subdirectory(plugin)
|
2018-03-08 00:57:42 +08:00
|
|
|
add_subdirectory(portability)
|
2014-09-22 18:41:39 +08:00
|
|
|
add_subdirectory(readability)
|
2017-03-20 01:23:23 +08:00
|
|
|
add_subdirectory(tool)
|
2014-08-13 21:57:57 +08:00
|
|
|
add_subdirectory(utils)
|
2018-03-15 07:47:50 +08:00
|
|
|
add_subdirectory(zircon)
|