Bug 1466427 - Migrate clang-tidy package from 5.0.1 to 7.0.0-rc2. r=glandium,janx
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Fri, 24 Aug 2018 12:39:58 +0000
changeset 488418 c61d20194e110427678cf3d528d9d6c54c3a6546
parent 488417 2102f887e46bf3cb2b6a7fb00ed33640c9cb330e
child 488419 d377aa2d4f9823616f9584852bc6f40510f9279e
push id9723
push userarchaeopteryx@coole-files.de
push dateSat, 25 Aug 2018 16:16:06 +0000
treeherdermozilla-beta@4c64041c3a30 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, janx
bugs1466427
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1466427 - Migrate clang-tidy package from 5.0.1 to 7.0.0-rc2. r=glandium,janx Differential Revision: https://phabricator.services.mozilla.com/D3980
build/build-clang/build-clang.py
build/build-clang/clang-tidy-cxx14.patch
build/build-clang/clang-tidy-linux64.json
build/build-clang/clang-tidy-macosx64.json
build/build-clang/clang-tidy-win32.json
build/build-clang/clang-tidy-win64.json
build/build-clang/llvm-debug-frame-for-5.patch
build/clang-plugin/import_mozilla_checks.py
tools/clang-tidy/config.yaml
tools/clang-tidy/test/bugprone-argument-comment.cpp
tools/clang-tidy/test/bugprone-argument-comment.json
tools/clang-tidy/test/bugprone-assert-side-effect.cpp
tools/clang-tidy/test/bugprone-assert-side-effect.json
tools/clang-tidy/test/bugprone-bool-pointer-implicit-conversion.cpp
tools/clang-tidy/test/bugprone-bool-pointer-implicit-conversion.json
tools/clang-tidy/test/bugprone-forward-declaration-namespace.cpp
tools/clang-tidy/test/bugprone-forward-declaration-namespace.json
tools/clang-tidy/test/bugprone-macro-repeated-side-effects.cpp
tools/clang-tidy/test/bugprone-macro-repeated-side-effects.json
tools/clang-tidy/test/bugprone-string-constructor.cpp
tools/clang-tidy/test/bugprone-string-constructor.json
tools/clang-tidy/test/bugprone-string-integer-assignment.cpp
tools/clang-tidy/test/bugprone-string-integer-assignment.json
tools/clang-tidy/test/bugprone-suspicious-missing-comma.cpp
tools/clang-tidy/test/bugprone-suspicious-missing-comma.json
tools/clang-tidy/test/bugprone-suspicious-semicolon.cpp
tools/clang-tidy/test/bugprone-suspicious-semicolon.json
tools/clang-tidy/test/bugprone-swapped-arguments.cpp
tools/clang-tidy/test/bugprone-swapped-arguments.json
tools/clang-tidy/test/bugprone-unused-raii.cpp
tools/clang-tidy/test/bugprone-unused-raii.json
tools/clang-tidy/test/misc-argument-comment.cpp
tools/clang-tidy/test/misc-argument-comment.json
tools/clang-tidy/test/misc-assert-side-effect.cpp
tools/clang-tidy/test/misc-assert-side-effect.json
tools/clang-tidy/test/misc-bool-pointer-implicit-conversion.cpp
tools/clang-tidy/test/misc-bool-pointer-implicit-conversion.json
tools/clang-tidy/test/misc-forward-declaration-namespace.cpp
tools/clang-tidy/test/misc-forward-declaration-namespace.json
tools/clang-tidy/test/misc-macro-repeated-side-effects.cpp
tools/clang-tidy/test/misc-macro-repeated-side-effects.json
tools/clang-tidy/test/misc-string-constructor.cpp
tools/clang-tidy/test/misc-string-constructor.json
tools/clang-tidy/test/misc-string-integer-assignment.cpp
tools/clang-tidy/test/misc-string-integer-assignment.json
tools/clang-tidy/test/misc-suspicious-missing-comma.cpp
tools/clang-tidy/test/misc-suspicious-missing-comma.json
tools/clang-tidy/test/misc-suspicious-semicolon.cpp
tools/clang-tidy/test/misc-suspicious-semicolon.json
tools/clang-tidy/test/misc-swapped-arguments.cpp
tools/clang-tidy/test/misc-swapped-arguments.json
tools/clang-tidy/test/misc-unused-raii.cpp
tools/clang-tidy/test/misc-unused-raii.json
--- a/build/build-clang/build-clang.py
+++ b/build/build-clang/build-clang.py
@@ -469,17 +469,18 @@ if __name__ == "__main__":
 
     config = json.load(args.config)
 
     llvm_revision = config["llvm_revision"]
     llvm_repo = config["llvm_repo"]
     clang_repo = config["clang_repo"]
     extra_repo = config.get("extra_repo")
     lld_repo = config.get("lld_repo")
-    compiler_repo = config["compiler_repo"]
+    # On some packages we don't use compiler_repo
+    compiler_repo = config.get("compiler_repo")
     libcxx_repo = config["libcxx_repo"]
     libcxxabi_repo = config.get("libcxxabi_repo")
     stages = 3
     if "stages" in config:
         stages = int(config["stages"])
         if stages not in (1, 2, 3):
             raise ValueError("We only know how to build 1, 2, or 3 stages")
     build_type = "Release"
@@ -538,17 +539,18 @@ if __name__ == "__main__":
         if os.path.exists(checkout_dir):
             svn_update(checkout_dir, llvm_revision)
         else:
             svn_co(source_dir, repo, checkout_dir, llvm_revision)
 
     if not args.skip_checkout:
         checkout_or_update(llvm_repo, llvm_source_dir)
         checkout_or_update(clang_repo, clang_source_dir)
-        checkout_or_update(compiler_repo, compiler_rt_source_dir)
+        if compiler_repo is not None:
+            checkout_or_update(compiler_repo, compiler_rt_source_dir)
         checkout_or_update(libcxx_repo, libcxx_source_dir)
         if lld_repo:
             checkout_or_update(lld_repo, lld_source_dir)
         if libcxxabi_repo:
             checkout_or_update(libcxxabi_repo, libcxxabi_source_dir)
         if extra_repo:
             checkout_or_update(extra_repo, extra_source_dir)
         for p in config.get("patches", []):
deleted file mode 100644
--- a/build/build-clang/clang-tidy-cxx14.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Backport cxx14 default dialect flag from clang 6.0.0 trunk to 5.0.1
-
-Index: lib/Frontend/CompilerInvocation.cpp
-===================================================================
---- a/clang/lib/Frontend/CompilerInvocation.cpp	(revision 320871)
-+++ b/clang/lib/Frontend/CompilerInvocation.cpp	(working copy)
-@@ -1690,11 +1690,11 @@
-       break;
-     case InputKind::CXX:
-     case InputKind::ObjCXX:
--      // The PS4 uses C++11 as the default C++ standard.
--      if (T.isPS4())
--        LangStd = LangStandard::lang_gnucxx11;
--      else
--        LangStd = LangStandard::lang_gnucxx98;
-+#if defined(CLANG_DEFAULT_STD_CXX)
-+      LangStd = CLANG_DEFAULT_STD_CXX;
-+#else
-+      LangStd = LangStandard::lang_gnucxx14;
-+#endif
-       break;
-     case InputKind::RenderScript:
-       LangStd = LangStandard::lang_c99;
--- a/build/build-clang/clang-tidy-linux64.json
+++ b/build/build-clang/clang-tidy-linux64.json
@@ -1,22 +1,20 @@
 {
-    "llvm_revision": "320871",
+    "llvm_revision": "340491",
     "stages": "1",
     "build_libcxx": true,
     "build_type": "Release",
     "assertions": false,
     "build_clang_tidy": true,
-    "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_501/final",
-    "clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_501/final",
-    "extra_repo": "https://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_501/final",
-    "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_501/final",
-    "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_501/final",
-    "libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_501/final",
+    "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_700/rc2/",
+    "clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_700/rc2/",
+    "extra_repo": "https://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_700/rc2/",
+    "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_700/rc2/",
+    "libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_700/rc2/",
     "python_path": "/usr/bin/python2.7",
     "gcc_dir": "/builds/worker/workspace/build/src/gcc",
     "cc": "/builds/worker/workspace/build/src/gcc/bin/gcc",
     "cxx": "/builds/worker/workspace/build/src/gcc/bin/g++",
     "as": "/builds/worker/workspace/build/src/gcc/bin/gcc",
     "patches": [
-      "clang-tidy-cxx14.patch"
     ]
-}
+}
\ No newline at end of file
--- a/build/build-clang/clang-tidy-macosx64.json
+++ b/build/build-clang/clang-tidy-macosx64.json
@@ -1,29 +1,25 @@
 {
-    "llvm_revision": "320871",
+    "llvm_revision": "340491",
     "stages": "1",
     "build_libcxx": true,
     "build_type": "Release",
     "assertions": false,
     "build_clang_tidy": true,
     "osx_cross_compile": true,
-    "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_501/final",
-    "clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_501/final",
-    "extra_repo": "https://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_501/final",
-    "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_501/final",
-    "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_501/final",
-    "libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_501/final",
+    "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_700/rc2",
+    "clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_700/rc2",
+    "extra_repo": "https://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_700/rc2",
+    "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_700/rc2",
+    "libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_700/rc2",
     "python_path": "/usr/bin/python2.7",
     "gcc_dir": "/builds/worker/workspace/build/src/gcc",
     "cc": "/builds/worker/workspace/build/src/clang/bin/clang",
     "cxx": "/builds/worker/workspace/build/src/clang/bin/clang++",
     "as": "/builds/worker/workspace/build/src/clang/bin/clang",
     "ar": "/builds/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin11-ar",
     "ranlib": "/builds/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin11-ranlib",
+    "libtool": "/builds/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin11-libtool",
     "ld": "/builds/worker/workspace/build/src/clang/bin/clang",
     "patches": [
-      "llvm-debug-frame-for-5.patch",
-      "compiler-rt-cross-compile.patch",
-      "compiler-rt-no-codesign.patch",
-      "clang-tidy-cxx14.patch"
     ]
 }
--- a/build/build-clang/clang-tidy-win32.json
+++ b/build/build-clang/clang-tidy-win32.json
@@ -1,19 +1,18 @@
 {
-    "llvm_revision": "320871",
+    "llvm_revision": "340491",
     "stages": "1",
     "build_libcxx": false,
     "build_type": "Release",
     "assertions": false,
     "build_clang_tidy": true,
-    "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_501/final",
-    "clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_501/final",
-    "extra_repo": "https://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_501/final",
-    "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_501/final",
+    "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_700/rc2",
+    "clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_700/rc2",
+    "extra_repo": "https://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_700/rc2",
+    "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_700/rc2",
     "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
     "python_path": "c:/mozilla-build/python/python.exe",
     "cc": "cl.exe",
     "cxx": "cl.exe",
     "patches": [
-      "clang-tidy-cxx14.patch"
     ]
 }
--- a/build/build-clang/clang-tidy-win64.json
+++ b/build/build-clang/clang-tidy-win64.json
@@ -1,20 +1,19 @@
 {
-    "llvm_revision": "320871",
+    "llvm_revision": "340491",
     "stages": "1",
     "build_libcxx": false,
     "build_type": "Release",
     "assertions": false,
     "build_clang_tidy": true,
-    "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_501/final",
-    "clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_501/final",
-    "extra_repo": "https://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_501/final",
-    "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_501/final",
+    "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_700/rc2",
+    "clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_700/rc2",
+    "extra_repo": "https://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_700/rc2",
+    "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_700/rc2",
     "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
     "python_path": "c:/mozilla-build/python/python.exe",
     "cc": "cl.exe",
     "cxx": "cl.exe",
     "ml": "ml64.exe",
     "patches": [
-      "clang-tidy-cxx14.patch"
     ]
 }
deleted file mode 100644
--- a/build/build-clang/llvm-debug-frame-for-5.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp
-===================================================================
---- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp	(revision 226419)
-+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp	(working copy)
-@@ -210,6 +210,8 @@
-     OutStreamer->EmitFileDirective(M.getSourceFileName());
-   }
-
-+  OutStreamer->EmitCFISections(true, true);
-+
-   GCModuleInfo *MI = getAnalysisIfAvailable<GCModuleInfo>();
-   assert(MI && "AsmPrinter didn't require GCModuleInfo?");
-   for (auto &I : *MI)
--- a/build/clang-plugin/import_mozilla_checks.py
+++ b/build/clang-plugin/import_mozilla_checks.py
@@ -109,17 +109,17 @@ def do_import(mozilla_path, clang_tidy_p
     copy_dir_contents(mozilla_path, module_path)
     write_third_party_paths(mozilla_path, module_path)
     write_cmake(module_path)
     add_item_to_cmake_section(os.path.join(module_path, '..', 'plugin',
                                            'CMakeLists.txt'),
                               'LINK_LIBS', 'clangTidyMozillaModule')
     add_item_to_cmake_section(os.path.join(module_path, '..', 'tool',
                                            'CMakeLists.txt'),
-                              'target_link_libraries', 'clangTidyMozillaModule')
+                              'PRIVATE', 'clangTidyMozillaModule')
     with open(os.path.join(module_path, '..', 'CMakeLists.txt'), 'a') as f:
         f.write('add_subdirectory(%s)\n' % module)
     with open(os.path.join(module_path, '..', 'tool', 'ClangTidyMain.cpp'), 'a') as f:
         f.write('''
 // This anchor is used to force the linker to link the MozillaModule.
 extern volatile int MozillaModuleAnchorSource;
 static int LLVM_ATTRIBUTE_UNUSED MozillaModuleAnchorDestination =
           MozillaModuleAnchorSource;
--- a/tools/clang-tidy/config.yaml
+++ b/tools/clang-tidy/config.yaml
@@ -6,18 +6,40 @@ target: obj-x86_64-pc-linux-gnu
 platforms:
   - macosx64
   - linux64
   - win64
   - win32
 clang_checkers:
   - name: -*
     publish: !!bool no
+  - name: bugprone-argument-comment
+    publish: !!bool yes
+  - name: bugprone-assert-side-effect
+    publish: !!bool yes
+  - name: bugprone-bool-pointer-implicit-conversion
+    publish: !!bool yes
+  - name: bugprone-forward-declaration-namespace
+    publish: !!bool yes
+  - name: bugprone-macro-repeated-side-effects
+    publish: !!bool yes
+  - name: bugprone-string-constructor
+    publish: !!bool yes
+  - name: bugprone-string-integer-assignment
+    publish: !!bool yes
   - name: bugprone-suspicious-memset-usage
     publish: !!bool yes
+  - name: bugprone-suspicious-missing-comma
+    publish: !!bool yes
+  - name: bugprone-suspicious-semicolon
+    publish: !!bool yes
+  - name: bugprone-swapped-arguments
+    publish: !!bool yes
+  - name: bugprone-unused-raii
+    publish: !!bool yes
   - name: clang-analyzer-cplusplus.NewDelete
     publish: !!bool yes
   - name: clang-analyzer-cplusplus.NewDeleteLeaks
     publish: !!bool yes
   - name: clang-analyzer-deadcode.DeadStores
     publish: !!bool yes
   - name: clang-analyzer-security.FloatLoopCounter
     publish: !!bool yes
@@ -37,44 +59,18 @@ clang_checkers:
   - name: clang-analyzer-security.insecureAPI.vfork
     publish: !!bool yes
   - name: clang-analyzer-unix.Malloc
     publish: !!bool yes
   - name: clang-analyzer-unix.cstring.BadSizeArg
     publish: !!bool yes
   - name: clang-analyzer-unix.cstring.NullArg
     publish: !!bool yes
-  - name: misc-argument-comment
-    # Name with clang tidy 6.0
-    # - name: bugprone-argument-comment
-    publish: !!bool yes
-  - name: misc-assert-side-effect
-    publish: !!bool yes
-  - name: misc-bool-pointer-implicit-conversion
-    publish: !!bool yes
-  - name: misc-forward-declaration-namespace
-    # Name with clang tidy 6.0. We are currently using 5.0
-    # - name: bugprone-forward-declaration-namespace
-    publish: !!bool yes
-  - name: misc-macro-repeated-side-effects
-    publish: !!bool yes
-  - name: misc-string-constructor
-    publish: !!bool yes
-  - name: misc-string-integer-assignment
-    publish: !!bool yes
-  - name: misc-suspicious-missing-comma
-    publish: !!bool yes
-  - name: misc-suspicious-semicolon
-    publish: !!bool yes
-  - name: misc-swapped-arguments
-    publish: !!bool yes
   - name: misc-unused-alias-decls
     publish: !!bool yes
-  - name: misc-unused-raii
-    publish: !!bool yes
   - name: misc-unused-using-decls
     publish: !!bool yes
   - name: modernize-avoid-bind
     publish: !!bool yes
     restricted-platforms:
       - win32
       - win64
   - name: modernize-loop-convert
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-argument-comment.cpp
@@ -0,0 +1,6 @@
+// bugprone-argument-comment
+
+void f(int x, int y);
+void g() {
+  f(/*y=*/0, /*z=*/0);
+}
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-argument-comment.json
@@ -0,0 +1,1 @@
+"[[\"warning\", \"argument name 'y' in comment does not match parameter name 'x'\", \"bugprone-argument-comment\"], [\"warning\", \"argument name 'z' in comment does not match parameter name 'y'\", \"bugprone-argument-comment\"]]"
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-assert-side-effect.cpp
@@ -0,0 +1,8 @@
+#include "structures.h"
+
+// bugprone-assert-side-effect
+void misc_assert_side_effect() {
+  int X = 0;
+  assert(X == 1);
+  assert(X = 1);
+}
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-assert-side-effect.json
@@ -0,0 +1,1 @@
+"[[\"warning\", \"found assert() with side effect\", \"bugprone-assert-side-effect\"]]"
\ No newline at end of file
rename from tools/clang-tidy/test/misc-bool-pointer-implicit-conversion.cpp
rename to tools/clang-tidy/test/bugprone-bool-pointer-implicit-conversion.cpp
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-bool-pointer-implicit-conversion.json
@@ -0,0 +1,1 @@
+"[[\"warning\", \"dubious check of 'bool *' against 'nullptr', did you mean to dereference it?\", \"bugprone-bool-pointer-implicit-conversion\"]]"
\ No newline at end of file
rename from tools/clang-tidy/test/misc-forward-declaration-namespace.cpp
rename to tools/clang-tidy/test/bugprone-forward-declaration-namespace.cpp
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-forward-declaration-namespace.json
@@ -0,0 +1,1 @@
+"[[\"warning\", \"no definition found for 'A', but a definition with the same name 'A' found in another namespace 'nb'\", \"bugprone-forward-declaration-namespace\"]]"
\ No newline at end of file
rename from tools/clang-tidy/test/misc-macro-repeated-side-effects.cpp
rename to tools/clang-tidy/test/bugprone-macro-repeated-side-effects.cpp
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-macro-repeated-side-effects.json
@@ -0,0 +1,1 @@
+"[[\"warning\", \"side effects in the 1st macro argument 'x' are repeated in macro expansion\", \"bugprone-macro-repeated-side-effects\"]]"
\ No newline at end of file
rename from tools/clang-tidy/test/misc-string-constructor.cpp
rename to tools/clang-tidy/test/bugprone-string-constructor.cpp
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-string-constructor.json
@@ -0,0 +1,1 @@
+"[[\"warning\", \"string constructor parameters are probably swapped; expecting string(count, character)\", \"bugprone-string-constructor\"], [\"warning\", \"length is bigger then string literal size\", \"bugprone-string-constructor\"], [\"warning\", \"constructor creating an empty string\", \"bugprone-string-constructor\"]]"
\ No newline at end of file
rename from tools/clang-tidy/test/misc-string-integer-assignment.cpp
rename to tools/clang-tidy/test/bugprone-string-integer-assignment.cpp
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-string-integer-assignment.json
@@ -0,0 +1,1 @@
+"[[\"warning\", \"an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility\", \"bugprone-string-integer-assignment\"], [\"warning\", \"an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility\", \"bugprone-string-integer-assignment\"]]"
\ No newline at end of file
rename from tools/clang-tidy/test/misc-suspicious-missing-comma.cpp
rename to tools/clang-tidy/test/bugprone-suspicious-missing-comma.cpp
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-suspicious-missing-comma.json
@@ -0,0 +1,1 @@
+"[[\"warning\", \"suspicious string literal, probably missing a comma\", \"bugprone-suspicious-missing-comma\"]]"
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-suspicious-semicolon.cpp
@@ -0,0 +1,8 @@
+
+// bugprone-suspicious-semicolon
+void nop();
+void fail1()
+{
+    int x = 0;
+    if(x > 5); nop();
+}
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-suspicious-semicolon.json
@@ -0,0 +1,1 @@
+"[[\"warning\", \"potentially unintended semicolon\", \"bugprone-suspicious-semicolon\"]]"
\ No newline at end of file
rename from tools/clang-tidy/test/misc-swapped-arguments.cpp
rename to tools/clang-tidy/test/bugprone-swapped-arguments.cpp
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-swapped-arguments.json
@@ -0,0 +1,1 @@
+"[[\"warning\", \"argument with implicit conversion from 'double' to 'int' followed by argument converted from 'int' to 'double', potentially swapped arguments.\", \"bugprone-swapped-arguments\"], [\"warning\", \"argument with implicit conversion from 'int' to 'double' followed by argument converted from 'double' to 'int', potentially swapped arguments.\", \"bugprone-swapped-arguments\"], [\"warning\", \"argument with implicit conversion from 'int' to 'double' followed by argument converted from 'double' to 'int', potentially swapped arguments.\", \"bugprone-swapped-arguments\"], [\"warning\", \"argument with implicit conversion from 'double' to 'int' followed by argument converted from 'int' to 'double', potentially swapped arguments.\", \"bugprone-swapped-arguments\"]]"
\ No newline at end of file
rename from tools/clang-tidy/test/misc-unused-raii.cpp
rename to tools/clang-tidy/test/bugprone-unused-raii.cpp
new file mode 100644
--- /dev/null
+++ b/tools/clang-tidy/test/bugprone-unused-raii.json
@@ -0,0 +1,1 @@
+"[[\"warning\", \"object destroyed immediately after creation; did you mean to name the object?\", \"bugprone-unused-raii\"]]"
\ No newline at end of file
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-argument-comment.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-
-// misc-argument-comment
-void f(int x, int y);
-void g() {
-  f(/*y=*/0, /*z=*/0);
-}
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-argument-comment.json
+++ /dev/null
@@ -1,1 +0,0 @@
-"[[\"warning\", \"argument name 'y' in comment does not match parameter name 'x'\", \"misc-argument-comment\"], [\"warning\", \"argument name 'z' in comment does not match parameter name 'y'\", \"misc-argument-comment\"]]"
\ No newline at end of file
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-assert-side-effect.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-
-#include "structures.h"
-
-// misc-assert-side-effect
-void misc_assert_side_effect() {
-  int X = 0;
-  assert(X == 1);
-  assert(X = 1);
-}
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-assert-side-effect.json
+++ /dev/null
@@ -1,1 +0,0 @@
-"[[\"warning\", \"found assert() with side effect\", \"misc-assert-side-effect\"]]"
\ No newline at end of file
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-bool-pointer-implicit-conversion.json
+++ /dev/null
@@ -1,1 +0,0 @@
-"[[\"warning\", \"dubious check of 'bool *' against 'nullptr', did you mean to dereference it?\", \"misc-bool-pointer-implicit-conversion\"]]"
\ No newline at end of file
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-forward-declaration-namespace.json
+++ /dev/null
@@ -1,1 +0,0 @@
-"[[\"warning\", \"no definition found for 'A', but a definition with the same name 'A' found in another namespace 'nb'\", \"misc-forward-declaration-namespace\"]]"
\ No newline at end of file
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-macro-repeated-side-effects.json
+++ /dev/null
@@ -1,1 +0,0 @@
-"[[\"warning\", \"side effects in the 1st macro argument 'x' are repeated in macro expansion\", \"misc-macro-repeated-side-effects\"]]"
\ No newline at end of file
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-string-constructor.json
+++ /dev/null
@@ -1,1 +0,0 @@
-"[[\"warning\", \"string constructor parameters are probably swapped; expecting string(count, character)\", \"misc-string-constructor\"], [\"warning\", \"length is bigger then string literal size\", \"misc-string-constructor\"], [\"warning\", \"constructor creating an empty string\", \"misc-string-constructor\"]]"
\ No newline at end of file
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-string-integer-assignment.json
+++ /dev/null
@@ -1,1 +0,0 @@
-"[[\"warning\", \"an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility\", \"misc-string-integer-assignment\"], [\"warning\", \"an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility\", \"misc-string-integer-assignment\"]]"
\ No newline at end of file
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-suspicious-missing-comma.json
+++ /dev/null
@@ -1,1 +0,0 @@
-"[[\"warning\", \"suspicious string literal, probably missing a comma\", \"misc-suspicious-missing-comma\"]]"
\ No newline at end of file
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-suspicious-semicolon.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-
-// misc-suspicious-semicolon
-void nop();
-void fail1()
-{
-    int x = 0;
-    if(x > 5); nop();
-}
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-suspicious-semicolon.json
+++ /dev/null
@@ -1,1 +0,0 @@
-"[[\"warning\", \"potentially unintended semicolon\", \"misc-suspicious-semicolon\"]]"
\ No newline at end of file
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-swapped-arguments.json
+++ /dev/null
@@ -1,1 +0,0 @@
-"[[\"warning\", \"argument with implicit conversion from 'double' to 'int' followed by argument converted from 'int' to 'double', potentially swapped arguments.\", \"misc-swapped-arguments\"], [\"warning\", \"argument with implicit conversion from 'int' to 'double' followed by argument converted from 'double' to 'int', potentially swapped arguments.\", \"misc-swapped-arguments\"], [\"warning\", \"argument with implicit conversion from 'int' to 'double' followed by argument converted from 'double' to 'int', potentially swapped arguments.\", \"misc-swapped-arguments\"], [\"warning\", \"argument with implicit conversion from 'double' to 'int' followed by argument converted from 'int' to 'double', potentially swapped arguments.\", \"misc-swapped-arguments\"]]"
\ No newline at end of file
deleted file mode 100644
--- a/tools/clang-tidy/test/misc-unused-raii.json
+++ /dev/null
@@ -1,1 +0,0 @@
-"[[\"warning\", \"object destroyed immediately after creation; did you mean to name the object?\", \"misc-unused-raii\"]]"
\ No newline at end of file