diff options
| author | Haojian Wu <hokein@google.com> | 2017-10-26 08:23:20 +0000 |
|---|---|---|
| committer | Haojian Wu <hokein@google.com> | 2017-10-26 08:23:20 +0000 |
| commit | abcd64ccbf3357598f792f97f039d1685f42d6e7 (patch) | |
| tree | 41551e56683d229552834f29c604aaf2d86516dd /clang-tools-extra/clang-tidy/plugin | |
| parent | 37d57dac63539e8f402db96f9053b7fa7205c8e8 (diff) | |
| download | bcm5719-llvm-abcd64ccbf3357598f792f97f039d1685f42d6e7.tar.gz bcm5719-llvm-abcd64ccbf3357598f792f97f039d1685f42d6e7.zip | |
[clang-tidy ObjC] [1/3] New module `objc` for Objective-C checks
Summary:
This is part 1 of 3 of a series of changes to improve Objective-C
linting in clang-tidy.
This introduces a new clang-tidy module, `objc`, specifically for
Objective-C / Objective-C++ checks.
The module is currently empty; D39142 adds the first check.
Test Plan: `ninja check-clang-tools`
Patch by Ben Hamilton!
Reviewers: hokein, alexfh
Reviewed By: hokein
Subscribers: Wizard, mgorny
Differential Revision: https://reviews.llvm.org/D39188
llvm-svn: 316643
Diffstat (limited to 'clang-tools-extra/clang-tidy/plugin')
| -rw-r--r-- | clang-tools-extra/clang-tidy/plugin/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/plugin/CMakeLists.txt b/clang-tools-extra/clang-tidy/plugin/CMakeLists.txt index 5c8883275b3..995c086515b 100644 --- a/clang-tools-extra/clang-tidy/plugin/CMakeLists.txt +++ b/clang-tools-extra/clang-tidy/plugin/CMakeLists.txt @@ -17,6 +17,7 @@ add_clang_library(clangTidyPlugin clangTidyMiscModule clangTidyModernizeModule clangTidyMPIModule + clangTidyObjCModule clangTidyPerformanceModule clangTidyReadabilityModule clangTooling diff --git a/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp b/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp index 1e6346c2ebd..25c13c76cd8 100644 --- a/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp +++ b/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp @@ -123,5 +123,10 @@ extern volatile int ReadabilityModuleAnchorSource; static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination = ReadabilityModuleAnchorSource; +// This anchor is used to force the linker to link the ObjCModule. +extern volatile int ObjCModuleAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination = + ObjCModuleAnchorSource; + } // namespace tidy } // namespace clang |

