forked from rettichschnidi/clang-tidy-misra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clang-tidy.patch
39 lines (37 loc) · 1.36 KB
/
clang-tidy.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff --git a/clang-tidy/CMakeLists.txt b/clang-tidy/CMakeLists.txt
index a8724694..384d5108 100644
--- a/clang-tidy/CMakeLists.txt
+++ b/clang-tidy/CMakeLists.txt
@@ -38,6 +38,7 @@ add_subdirectory(google)
add_subdirectory(hicpp)
add_subdirectory(llvm)
add_subdirectory(misc)
+add_subdirectory(misra)
add_subdirectory(modernize)
add_subdirectory(mpi)
add_subdirectory(objc)
diff --git a/clang-tidy/tool/CMakeLists.txt b/clang-tidy/tool/CMakeLists.txt
index a3ec4ae7..c9b707f6 100644
--- a/clang-tidy/tool/CMakeLists.txt
+++ b/clang-tidy/tool/CMakeLists.txt
@@ -27,6 +27,7 @@ target_link_libraries(clang-tidy
clangTidyGoogleModule
clangTidyHICPPModule
clangTidyLLVMModule
+ clangTidyMISRAModule
clangTidyMiscModule
clangTidyModernizeModule
clangTidyMPIModule
diff --git a/clang-tidy/tool/ClangTidyMain.cpp b/clang-tidy/tool/ClangTidyMain.cpp
index 07accbbc..c5844e7d 100644
--- a/clang-tidy/tool/ClangTidyMain.cpp
+++ b/clang-tidy/tool/ClangTidyMain.cpp
@@ -539,6 +539,10 @@ extern volatile int ZirconModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination =
ZirconModuleAnchorSource;
+// This anchor is used to force the linker to link the MISRAModule.
+extern volatile int MISRAModuleAnchorSource;
+static int LLVM_ATTRIBUTE_UNUSED MISRAModuleAnchorDestination = MISRAModuleAnchorSource;
+
} // namespace tidy
} // namespace clang