alexfh created this revision.
alexfh added reviewers: hokein, sammccall, aaron.ballman.
Herald added subscribers: xazax.hun, mgorny, klimek.

clang-tidy/rename_check.py {misc,bugprone}-suspicious-semicolon
clang-tidy/rename_check.py {misc,bugprone}-suspicious-string-compare
clang-tidy/rename_check.py {misc,bugprone}-swapped-arguments
clang-tidy/rename_check.py {misc,bugprone}-undelegated-constructor 
--check_class_name UndelegatedConstructor


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D43870

Files:
  clang-tidy/bugprone/BugproneTidyModule.cpp
  clang-tidy/bugprone/CMakeLists.txt
  clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp
  clang-tidy/bugprone/SuspiciousSemicolonCheck.h
  clang-tidy/bugprone/SuspiciousStringCompareCheck.cpp
  clang-tidy/bugprone/SuspiciousStringCompareCheck.h
  clang-tidy/bugprone/SwappedArgumentsCheck.cpp
  clang-tidy/bugprone/SwappedArgumentsCheck.h
  clang-tidy/bugprone/UndelegatedConstructorCheck.cpp
  clang-tidy/bugprone/UndelegatedConstructorCheck.h
  clang-tidy/hicpp/HICPPTidyModule.cpp
  clang-tidy/misc/CMakeLists.txt
  clang-tidy/misc/MiscTidyModule.cpp
  clang-tidy/misc/SuspiciousSemicolonCheck.cpp
  clang-tidy/misc/SuspiciousSemicolonCheck.h
  clang-tidy/misc/SuspiciousStringCompareCheck.cpp
  clang-tidy/misc/SuspiciousStringCompareCheck.h
  clang-tidy/misc/SwappedArgumentsCheck.cpp
  clang-tidy/misc/SwappedArgumentsCheck.h
  clang-tidy/misc/UndelegatedConstructor.cpp
  clang-tidy/misc/UndelegatedConstructor.h
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/bugprone-suspicious-semicolon.rst
  docs/clang-tidy/checks/bugprone-suspicious-string-compare.rst
  docs/clang-tidy/checks/bugprone-swapped-arguments.rst
  docs/clang-tidy/checks/bugprone-undelegated-constructor.rst
  docs/clang-tidy/checks/hicpp-undelegated-constructor.rst
  docs/clang-tidy/checks/list.rst
  docs/clang-tidy/checks/misc-suspicious-semicolon.rst
  docs/clang-tidy/checks/misc-suspicious-string-compare.rst
  docs/clang-tidy/checks/misc-swapped-arguments.rst
  docs/clang-tidy/checks/misc-undelegated-constructor.rst
  test/clang-tidy/bugprone-suspicious-semicolon-fail.cpp
  test/clang-tidy/bugprone-suspicious-semicolon.cpp
  test/clang-tidy/bugprone-suspicious-string-compare.c
  test/clang-tidy/bugprone-suspicious-string-compare.cpp
  test/clang-tidy/bugprone-swapped-arguments.cpp
  test/clang-tidy/bugprone-undelegated-constructor-cxx98.cpp
  test/clang-tidy/bugprone-undelegated-constructor.cpp
  test/clang-tidy/misc-suspicious-semicolon-fail.cpp
  test/clang-tidy/misc-suspicious-semicolon.cpp
  test/clang-tidy/misc-suspicious-string-compare.c
  test/clang-tidy/misc-suspicious-string-compare.cpp
  test/clang-tidy/misc-swapped-arguments.cpp
  test/clang-tidy/misc-undelegated-constructor-cxx98.cpp
  test/clang-tidy/misc-undelegated-constructor.cpp
  test/clang-tidy/objc-arc-and-properties.m
  test/clang-tidy/objc-no-arc-or-properties.m

Index: test/clang-tidy/objc-no-arc-or-properties.m
===================================================================
--- test/clang-tidy/objc-no-arc-or-properties.m
+++ test/clang-tidy/objc-no-arc-or-properties.m
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s misc-suspicious-semicolon %t -- -- -fno-objc-arc -fobjc-abi-version=1
+// RUN: %check_clang_tidy %s bugprone-suspicious-semicolon %t -- -- -fno-objc-arc -fobjc-abi-version=1
 
 // This test ensures check_clang_tidy.py allows disabling Objective-C ARC and
 // Objective-C 2.0 via passing arguments after -- on the command line.
@@ -24,6 +24,6 @@
 void fail(Foo *f)
 {
   if([f shouldDoStuff]); [f nop];
-  // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: potentially unintended semicolon [misc-suspicious-semicolon]
+  // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: potentially unintended semicolon [bugprone-suspicious-semicolon]
   // CHECK-FIXES: if([f shouldDoStuff]) [f nop];
 }
Index: test/clang-tidy/objc-arc-and-properties.m
===================================================================
--- test/clang-tidy/objc-arc-and-properties.m
+++ test/clang-tidy/objc-arc-and-properties.m
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s misc-suspicious-semicolon %t
+// RUN: %check_clang_tidy %s bugprone-suspicious-semicolon %t
 
 // This test checks if Objective-C 2.0 (@properties) and
 // Automatic Reference Counting (ARC) are enabled for .m files
@@ -16,6 +16,6 @@
 void fail(Foo *f)
 {
   if(f.shouldDoStuff); [f nop];
-  // CHECK-MESSAGES: :[[@LINE-1]]:22: warning: potentially unintended semicolon [misc-suspicious-semicolon]
+  // CHECK-MESSAGES: :[[@LINE-1]]:22: warning: potentially unintended semicolon [bugprone-suspicious-semicolon]
   // CHECK-FIXES: if(f.shouldDoStuff) [f nop];
 }
Index: test/clang-tidy/bugprone-undelegated-constructor.cpp
===================================================================
--- test/clang-tidy/bugprone-undelegated-constructor.cpp
+++ test/clang-tidy/bugprone-undelegated-constructor.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s misc-undelegated-constructor %t
+// RUN: %check_clang_tidy %s bugprone-undelegated-constructor %t
 
 struct Ctor;
 Ctor foo();
@@ -9,7 +9,7 @@
   Ctor(int, int);
   Ctor(Ctor *i) {
     Ctor();
-// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? A temporary object is created here instead [misc-undelegated-constructor]
+// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? A temporary object is created here instead [bugprone-undelegated-constructor]
     Ctor(0);
 // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor?
     Ctor(1, 2);
Index: test/clang-tidy/bugprone-undelegated-constructor-cxx98.cpp
===================================================================
--- test/clang-tidy/bugprone-undelegated-constructor-cxx98.cpp
+++ test/clang-tidy/bugprone-undelegated-constructor-cxx98.cpp
@@ -1,4 +1,4 @@
-// RUN: clang-tidy %s -checks=-*,misc-undelegated-constructor -- -std=c++98 | count 0
+// RUN: clang-tidy %s -checks=-*,bugprone-undelegated-constructor -- -std=c++98 | count 0
 
 // Note: this test expects no diagnostics, but FileCheck cannot handle that,
 // hence the use of | count 0.
Index: test/clang-tidy/bugprone-swapped-arguments.cpp
===================================================================
--- test/clang-tidy/bugprone-swapped-arguments.cpp
+++ test/clang-tidy/bugprone-swapped-arguments.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s misc-swapped-arguments %t
+// RUN: %check_clang_tidy %s bugprone-swapped-arguments %t
 
 void F(int, double);
 
Index: test/clang-tidy/bugprone-suspicious-string-compare.cpp
===================================================================
--- test/clang-tidy/bugprone-suspicious-string-compare.cpp
+++ test/clang-tidy/bugprone-suspicious-string-compare.cpp
@@ -1,7 +1,7 @@
-// RUN: %check_clang_tidy %s misc-suspicious-string-compare %t -- \
+// RUN: %check_clang_tidy %s bugprone-suspicious-string-compare %t -- \
 // RUN: -config='{CheckOptions: \
-// RUN:  [{key: misc-suspicious-string-compare.WarnOnImplicitComparison, value: 1}, \
-// RUN:   {key: misc-suspicious-string-compare.WarnOnLogicalNotComparison, value: 1}]}' \
+// RUN:  [{key: bugprone-suspicious-string-compare.WarnOnImplicitComparison, value: 1}, \
+// RUN:   {key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison, value: 1}]}' \
 // RUN: --
 
 typedef __SIZE_TYPE__ size;
@@ -61,7 +61,7 @@
 int test_warning_patterns() {
   if (strcmp(A, "a"))
     return 0;
-  // CHECK-MESSAGES: [[@LINE-2]]:7: warning: function 'strcmp' is called without explicitly comparing result [misc-suspicious-string-compare]
+  // CHECK-MESSAGES: [[@LINE-2]]:7: warning: function 'strcmp' is called without explicitly comparing result [bugprone-suspicious-string-compare]
   // CHECK-FIXES: if (strcmp(A, "a") != 0)
 
   if (strcmp(A, "a") == 0 ||
Index: test/clang-tidy/bugprone-suspicious-string-compare.c
===================================================================
--- test/clang-tidy/bugprone-suspicious-string-compare.c
+++ test/clang-tidy/bugprone-suspicious-string-compare.c
@@ -1,7 +1,7 @@
-// RUN: %check_clang_tidy %s misc-suspicious-string-compare %t -- \
+// RUN: %check_clang_tidy %s bugprone-suspicious-string-compare %t -- \
 // RUN: -config='{CheckOptions: \
-// RUN:  [{key: misc-suspicious-string-compare.WarnOnImplicitComparison, value: 1}, \
-// RUN:   {key: misc-suspicious-string-compare.WarnOnLogicalNotComparison, value: 1}]}' \
+// RUN:  [{key: bugprone-suspicious-string-compare.WarnOnImplicitComparison, value: 1}, \
+// RUN:   {key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison, value: 1}]}' \
 // RUN: -- -std=c99
 
 static const char A[] = "abc";
@@ -11,7 +11,7 @@
 int test_warning_patterns() {
   if (strcmp(A, "a"))
     return 0;
-  // CHECK-MESSAGES: [[@LINE-2]]:7: warning: function 'strcmp' is called without explicitly comparing result [misc-suspicious-string-compare]
+  // CHECK-MESSAGES: [[@LINE-2]]:7: warning: function 'strcmp' is called without explicitly comparing result [bugprone-suspicious-string-compare]
   // CHECK-FIXES: if (strcmp(A, "a") != 0)
 
   if (strcmp(A, "a") != 0 ||
Index: test/clang-tidy/bugprone-suspicious-semicolon.cpp
===================================================================
--- test/clang-tidy/bugprone-suspicious-semicolon.cpp
+++ test/clang-tidy/bugprone-suspicious-semicolon.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s misc-suspicious-semicolon %t
+// RUN: %check_clang_tidy %s bugprone-suspicious-semicolon %t
 
 int x = 5;
 
@@ -26,15 +26,15 @@
 void fail1()
 {
   if(x > 5); nop();
-  // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: potentially unintended semicolon [misc-suspicious-semicolon]
+  // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: potentially unintended semicolon [bugprone-suspicious-semicolon]
   // CHECK-FIXES: if(x > 5) nop();
 }
 
 void fail2()
 {
 	if(x == 5);
 		nop();
-  // CHECK-MESSAGES: :[[@LINE-2]]:12: warning: potentially unintended semicolon [misc-suspicious-semicolon]
+  // CHECK-MESSAGES: :[[@LINE-2]]:12: warning: potentially unintended semicolon [bugprone-suspicious-semicolon]
   // CHECK-FIXES: if(x == 5){{$}}
 }
 
Index: test/clang-tidy/bugprone-suspicious-semicolon-fail.cpp
===================================================================
--- test/clang-tidy/bugprone-suspicious-semicolon-fail.cpp
+++ test/clang-tidy/bugprone-suspicious-semicolon-fail.cpp
@@ -1,7 +1,7 @@
-// RUN: clang-tidy %s -checks="-*,misc-suspicious-semicolon" -- -DERROR 2>&1 \
+// RUN: clang-tidy %s -checks="-*,bugprone-suspicious-semicolon" -- -DERROR 2>&1 \
 // RUN:   | FileCheck %s -check-prefix=CHECK-ERROR \
 // RUN:       -implicit-check-not="{{warning|error}}:"
-// RUN: clang-tidy %s -checks="-*,misc-suspicious-semicolon,clang-diagnostic*" \
+// RUN: clang-tidy %s -checks="-*,bugprone-suspicious-semicolon,clang-diagnostic*" \
 // RUN:    -- -DWERROR -Wno-everything -Werror=unused-variable 2>&1 \
 // RUN:   | FileCheck %s -check-prefix=CHECK-WERROR \
 // RUN:       -implicit-check-not="{{warning|error}}:"
@@ -13,7 +13,7 @@
 
 void f() {
   if (g());
-  // CHECK-WERROR: :[[@LINE-1]]:11: warning: potentially unintended semicolon [misc-suspicious-semicolon]
+  // CHECK-WERROR: :[[@LINE-1]]:11: warning: potentially unintended semicolon [bugprone-suspicious-semicolon]
 #if ERROR
   int a
   // CHECK-ERROR: :[[@LINE-1]]:8: error: expected ';' at end of declaration [clang-diagnostic-error]
Index: docs/clang-tidy/checks/misc-swapped-arguments.rst
===================================================================
--- docs/clang-tidy/checks/misc-swapped-arguments.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-.. title:: clang-tidy - misc-swapped-arguments
-
-misc-swapped-arguments
-======================
-
-
-Finds potentially swapped arguments by looking at implicit conversions.
Index: docs/clang-tidy/checks/list.rst
===================================================================
--- docs/clang-tidy/checks/list.rst
+++ docs/clang-tidy/checks/list.rst
@@ -40,8 +40,12 @@
    bugprone-suspicious-enum-usage
    bugprone-suspicious-memset-usage
    bugprone-suspicious-missing-comma
+   bugprone-suspicious-semicolon
+   bugprone-suspicious-string-compare
+   bugprone-swapped-arguments
    bugprone-throw-keyword-missing
    bugprone-undefined-memory-manipulation
+   bugprone-undelegated-constructor
    bugprone-use-after-move
    bugprone-virtual-near-miss
    cert-dcl03-c (redirects to misc-static-assert) <cert-dcl03-c>
@@ -121,7 +125,7 @@
    hicpp-signed-bitwise
    hicpp-special-member-functions (redirects to cppcoreguidelines-special-member-functions) <hicpp-special-member-functions>
    hicpp-static-assert (redirects to misc-static-assert) <hicpp-static-assert>
-   hicpp-undelegated-constructor (redirects to misc-undelegated-constructor) <hicpp-undelegated-constructor>
+   hicpp-undelegated-constructor (redirects to bugprone-undelegated-constructor) <hicpp-undelegated-constructor>
    hicpp-use-auto (redirects to modernize-use-auto) <hicpp-use-auto>
    hicpp-use-emplace (redirects to modernize-use-emplace) <hicpp-use-emplace>
    hicpp-use-equals-default (redirects to modernize-use-equals-default) <hicpp-use-equals-default>
@@ -143,12 +147,8 @@
    misc-sizeof-container
    misc-sizeof-expression
    misc-static-assert
-   misc-suspicious-semicolon
-   misc-suspicious-string-compare
-   misc-swapped-arguments
    misc-throw-by-value-catch-by-reference
    misc-unconventional-assign-operator
-   misc-undelegated-constructor
    misc-uniqueptr-reset-release
    misc-unused-alias-decls
    misc-unused-parameters
Index: docs/clang-tidy/checks/hicpp-undelegated-constructor.rst
===================================================================
--- docs/clang-tidy/checks/hicpp-undelegated-constructor.rst
+++ docs/clang-tidy/checks/hicpp-undelegated-constructor.rst
@@ -1,11 +1,11 @@
 .. title:: clang-tidy - hicpp-undelegated-construtor
 .. meta::
-   :http-equiv=refresh: 5;URL=misc-undelegated-constructor.html
+   :http-equiv=refresh: 5;URL=bugprone-undelegated-constructor.html
 
 hicpp-undelegated-constructor
 =============================
 
-This check is an alias for `misc-undelegated-constructor <misc-undelegated-constructor.html>`_.
+This check is an alias for `bugprone-undelegated-constructor <bugprone-undelegated-constructor.html>`_.
 Partially implements `rule 12.4.5 <http://www.codingstandard.com/rule/12-4-5-use-delegating-constructors-to-reduce-code-duplication/>`_ 
 to find misplaced constructor calls inside a constructor.
 
Index: docs/clang-tidy/checks/bugprone-undelegated-constructor.rst
===================================================================
--- docs/clang-tidy/checks/bugprone-undelegated-constructor.rst
+++ docs/clang-tidy/checks/bugprone-undelegated-constructor.rst
@@ -1,7 +1,7 @@
-.. title:: clang-tidy - misc-undelegated-constructor
+.. title:: clang-tidy - bugprone-undelegated-constructor
 
-misc-undelegated-constructor
-============================
+bugprone-undelegated-constructor
+================================
 
 
 Finds creation of temporary objects in constructors that look like a
Index: docs/clang-tidy/checks/bugprone-swapped-arguments.rst
===================================================================
--- /dev/null
+++ docs/clang-tidy/checks/bugprone-swapped-arguments.rst
@@ -0,0 +1,7 @@
+.. title:: clang-tidy - bugprone-swapped-arguments
+
+bugprone-swapped-arguments
+==========================
+
+
+Finds potentially swapped arguments by looking at implicit conversions.
Index: docs/clang-tidy/checks/bugprone-suspicious-string-compare.rst
===================================================================
--- docs/clang-tidy/checks/bugprone-suspicious-string-compare.rst
+++ docs/clang-tidy/checks/bugprone-suspicious-string-compare.rst
@@ -1,7 +1,7 @@
-.. title:: clang-tidy - misc-suspicious-string-compare
+.. title:: clang-tidy - bugprone-suspicious-string-compare
 
-misc-suspicious-string-compare
-==============================
+bugprone-suspicious-string-compare
+==================================
 
 Find suspicious usage of runtime string comparison functions.
 This check is valid in C and C++.
Index: docs/clang-tidy/checks/bugprone-suspicious-semicolon.rst
===================================================================
--- docs/clang-tidy/checks/bugprone-suspicious-semicolon.rst
+++ docs/clang-tidy/checks/bugprone-suspicious-semicolon.rst
@@ -1,7 +1,7 @@
-.. title:: clang-tidy - misc-suspicious-semicolon
+.. title:: clang-tidy - bugprone-suspicious-semicolon
 
-misc-suspicious-semicolon
-=========================
+bugprone-suspicious-semicolon
+=============================
 
 Finds most instances of stray semicolons that unexpectedly alter the meaning of
 the code. More specifically, it looks for ``if``, ``while``, ``for`` and
Index: docs/ReleaseNotes.rst
===================================================================
--- docs/ReleaseNotes.rst
+++ docs/ReleaseNotes.rst
@@ -57,6 +57,18 @@
 Improvements to clang-tidy
 --------------------------
 
+- The 'misc-undelegated-constructor' check was renamed to `bugprone-undelegated-constructor
+  <http://clang.llvm.org/extra/clang-tidy/checks/bugprone-undelegated-constructor.html>`_
+
+- The 'misc-swapped-arguments' check was renamed to `bugprone-swapped-arguments
+  <http://clang.llvm.org/extra/clang-tidy/checks/bugprone-swapped-arguments.html>`_
+
+- The 'misc-suspicious-string-compare' check was renamed to `bugprone-suspicious-string-compare
+  <http://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-string-compare.html>`_
+
+- The 'misc-suspicious-semicolon' check was renamed to `bugprone-suspicious-semicolon
+  <http://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-semicolon.html>`_
+
 - The 'misc-suspicious-missing-comma' check was renamed to `bugprone-suspicious-missing-comma
   <http://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-missing-comma.html>`_
 
Index: clang-tidy/misc/MiscTidyModule.cpp
===================================================================
--- clang-tidy/misc/MiscTidyModule.cpp
+++ clang-tidy/misc/MiscTidyModule.cpp
@@ -19,12 +19,8 @@
 #include "SizeofContainerCheck.h"
 #include "SizeofExpressionCheck.h"
 #include "StaticAssertCheck.h"
-#include "SuspiciousSemicolonCheck.h"
-#include "SuspiciousStringCompareCheck.h"
-#include "SwappedArgumentsCheck.h"
 #include "ThrowByValueCatchByReferenceCheck.h"
 #include "UnconventionalAssignOperatorCheck.h"
-#include "UndelegatedConstructor.h"
 #include "UniqueptrResetReleaseCheck.h"
 #include "UnusedAliasDeclsCheck.h"
 #include "UnusedParametersCheck.h"
@@ -55,16 +51,8 @@
     CheckFactories.registerCheck<SizeofExpressionCheck>(
         "misc-sizeof-expression");
     CheckFactories.registerCheck<StaticAssertCheck>("misc-static-assert");
-    CheckFactories.registerCheck<SuspiciousSemicolonCheck>(
-        "misc-suspicious-semicolon");
-    CheckFactories.registerCheck<SuspiciousStringCompareCheck>(
-        "misc-suspicious-string-compare");
-    CheckFactories.registerCheck<SwappedArgumentsCheck>(
-        "misc-swapped-arguments");
     CheckFactories.registerCheck<ThrowByValueCatchByReferenceCheck>(
         "misc-throw-by-value-catch-by-reference");
-    CheckFactories.registerCheck<UndelegatedConstructorCheck>(
-        "misc-undelegated-constructor");
     CheckFactories.registerCheck<UniqueptrResetReleaseCheck>(
         "misc-uniqueptr-reset-release");
     CheckFactories.registerCheck<UnusedAliasDeclsCheck>(
Index: clang-tidy/misc/CMakeLists.txt
===================================================================
--- clang-tidy/misc/CMakeLists.txt
+++ clang-tidy/misc/CMakeLists.txt
@@ -12,11 +12,7 @@
   SizeofContainerCheck.cpp
   SizeofExpressionCheck.cpp
   StaticAssertCheck.cpp
-  SuspiciousSemicolonCheck.cpp
-  SuspiciousStringCompareCheck.cpp
-  SwappedArgumentsCheck.cpp
   ThrowByValueCatchByReferenceCheck.cpp
-  UndelegatedConstructor.cpp
   UniqueptrResetReleaseCheck.cpp
   UnusedAliasDeclsCheck.cpp
   UnusedParametersCheck.cpp
Index: clang-tidy/hicpp/HICPPTidyModule.cpp
===================================================================
--- clang-tidy/hicpp/HICPPTidyModule.cpp
+++ clang-tidy/hicpp/HICPPTidyModule.cpp
@@ -21,7 +21,7 @@
 #include "../google/ExplicitConstructorCheck.h"
 #include "../misc/NewDeleteOverloadsCheck.h"
 #include "../misc/StaticAssertCheck.h"
-#include "../misc/UndelegatedConstructor.h"
+#include "../bugprone/UndelegatedConstructorCheck.h"
 #include "../modernize/DeprecatedHeadersCheck.h"
 #include "../modernize/UseAutoCheck.h"
 #include "../modernize/UseEmplaceCheck.h"
@@ -83,7 +83,7 @@
     CheckFactories.registerCheck<misc::StaticAssertCheck>(
         "hicpp-static-assert");
     CheckFactories.registerCheck<modernize::UseAutoCheck>("hicpp-use-auto");
-    CheckFactories.registerCheck<misc::UndelegatedConstructorCheck>(
+    CheckFactories.registerCheck<bugprone::UndelegatedConstructorCheck>(
         "hicpp-undelegated-constructor");
     CheckFactories.registerCheck<modernize::UseEmplaceCheck>(
         "hicpp-use-emplace");
Index: clang-tidy/bugprone/UndelegatedConstructorCheck.h
===================================================================
--- clang-tidy/bugprone/UndelegatedConstructorCheck.h
+++ clang-tidy/bugprone/UndelegatedConstructorCheck.h
@@ -1,4 +1,4 @@
-//===--- UndelegatedConstructor.h - clang-tidy ------------------*- C++ -*-===//
+//===--- UndelegatedConstructorCheck.h - clang-tidy -------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -14,7 +14,7 @@
 
 namespace clang {
 namespace tidy {
-namespace misc {
+namespace bugprone {
 
 /// Finds creation of temporary objects in constructors that look like a
 /// function call to another constructor of the same class.
@@ -29,7 +29,7 @@
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
-} // namespace misc
+} // namespace bugprone
 } // namespace tidy
 } // namespace clang
 
Index: clang-tidy/bugprone/UndelegatedConstructorCheck.cpp
===================================================================
--- clang-tidy/bugprone/UndelegatedConstructorCheck.cpp
+++ clang-tidy/bugprone/UndelegatedConstructorCheck.cpp
@@ -1,21 +1,21 @@
-//===--- UndelegatedConstructor.cpp - clang-tidy --------------------------===//
+//===--- UndelegatedConstructorCheck.cpp - clang-tidy --------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 
-#include "UndelegatedConstructor.h"
+#include "UndelegatedConstructorCheck.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/Lex/Lexer.h"
 
 using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
-namespace misc {
+namespace bugprone {
 
 namespace {
 AST_MATCHER_P(Stmt, ignoringTemporaryExpr,
@@ -79,6 +79,6 @@
                          "A temporary object is created here instead");
 }
 
-} // namespace misc
+} // namespace bugprone
 } // namespace tidy
 } // namespace clang
Index: clang-tidy/bugprone/SwappedArgumentsCheck.h
===================================================================
--- clang-tidy/bugprone/SwappedArgumentsCheck.h
+++ clang-tidy/bugprone/SwappedArgumentsCheck.h
@@ -7,14 +7,14 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_SWAPPEDARGUMENTSCHECK_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_SWAPPEDARGUMENTSCHECK_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SWAPPEDARGUMENTSCHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SWAPPEDARGUMENTSCHECK_H
 
 #include "../ClangTidy.h"
 
 namespace clang {
 namespace tidy {
-namespace misc {
+namespace bugprone {
 
 /// Finds potentially swapped arguments by looking at implicit conversions.
 class SwappedArgumentsCheck : public ClangTidyCheck {
@@ -25,8 +25,8 @@
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
-} // namespace misc
+} // namespace bugprone
 } // namespace tidy
 } // namespace clang
 
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_SWAPPEDARGUMENTSCHECK_H
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SWAPPEDARGUMENTSCHECK_H
Index: clang-tidy/bugprone/SwappedArgumentsCheck.cpp
===================================================================
--- clang-tidy/bugprone/SwappedArgumentsCheck.cpp
+++ clang-tidy/bugprone/SwappedArgumentsCheck.cpp
@@ -17,7 +17,7 @@
 
 namespace clang {
 namespace tidy {
-namespace misc {
+namespace bugprone {
 
 void SwappedArgumentsCheck::registerMatchers(MatchFinder *Finder) {
   Finder->addMatcher(callExpr().bind("call"), this);
@@ -97,6 +97,6 @@
   }
 }
 
-} // namespace misc
+} // namespace bugprone
 } // namespace tidy
 } // namespace clang
Index: clang-tidy/bugprone/SuspiciousStringCompareCheck.h
===================================================================
--- clang-tidy/bugprone/SuspiciousStringCompareCheck.h
+++ clang-tidy/bugprone/SuspiciousStringCompareCheck.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_SUSPICIOUS_STRING_COMPARE_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_SUSPICIOUS_STRING_COMPARE_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSSTRINGCOMPARECHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSSTRINGCOMPARECHECK_H
 
 #include "../ClangTidy.h"
 
 namespace clang {
 namespace tidy {
-namespace misc {
+namespace bugprone {
 
 /// Find suspicious calls to string compare functions.
 ///
 /// For the user-facing documentation see:
-/// http://clang.llvm.org/extra/clang-tidy/checks/misc-suspicious-string-compare.html
+/// http://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-string-compare.html
 class SuspiciousStringCompareCheck : public ClangTidyCheck {
 public:
   SuspiciousStringCompareCheck(StringRef Name, ClangTidyContext *Context);
@@ -33,8 +33,8 @@
   const std::string StringCompareLikeFunctions;
 };
 
-} // namespace misc
+} // namespace bugprone
 } // namespace tidy
 } // namespace clang
 
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_SUSPICIOUS_STRING_COMPARE_H
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSSTRINGCOMPARECHECK_H
Index: clang-tidy/bugprone/SuspiciousStringCompareCheck.cpp
===================================================================
--- clang-tidy/bugprone/SuspiciousStringCompareCheck.cpp
+++ clang-tidy/bugprone/SuspiciousStringCompareCheck.cpp
@@ -18,7 +18,7 @@
 
 namespace clang {
 namespace tidy {
-namespace misc {
+namespace bugprone {
 
 // Semicolon separated list of known string compare-like functions. The list
 // must ends with a semicolon.
@@ -213,6 +213,6 @@
   }
 }
 
-} // namespace misc
+} // namespace bugprone
 } // namespace tidy
 } // namespace clang
Index: clang-tidy/bugprone/SuspiciousSemicolonCheck.h
===================================================================
--- clang-tidy/bugprone/SuspiciousSemicolonCheck.h
+++ clang-tidy/bugprone/SuspiciousSemicolonCheck.h
@@ -7,30 +7,30 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_SUSPICIOUS_SEMICOLON_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_SUSPICIOUS_SEMICOLON_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSSEMICOLONCHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSSEMICOLONCHECK_H
 
 #include "../ClangTidy.h"
 
 namespace clang {
 namespace tidy {
-namespace misc {
+namespace bugprone {
 
 /// This check finds semicolon that modifies the meaning of the program
 /// unintendedly.
 ///
 /// For the user-facing documentation see:
-/// http://clang.llvm.org/extra/clang-tidy/checks/misc-suspicious-semicolon.html
+/// http://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-semicolon.html
 class SuspiciousSemicolonCheck : public ClangTidyCheck {
 public:
   SuspiciousSemicolonCheck(StringRef Name, ClangTidyContext *Context)
       : ClangTidyCheck(Name, Context) {}
   void registerMatchers(ast_matchers::MatchFinder *Finder) override;
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
-} // namespace misc
+} // namespace bugprone
 } // namespace tidy
 } // namespace clang
 
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_SUSPICIOUS_SEMICOLON_H
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSSEMICOLONCHECK_H
Index: clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp
===================================================================
--- clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp
+++ clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp
@@ -16,7 +16,7 @@
 
 namespace clang {
 namespace tidy {
-namespace misc {
+namespace bugprone {
 
 void SuspiciousSemicolonCheck::registerMatchers(MatchFinder *Finder) {
   Finder->addMatcher(
@@ -72,6 +72,6 @@
       << FixItHint::CreateRemoval(SourceRange(LocStart, LocEnd));
 }
 
-} // namespace misc
+} // namespace bugprone
 } // namespace tidy
 } // namespace clang
Index: clang-tidy/bugprone/CMakeLists.txt
===================================================================
--- clang-tidy/bugprone/CMakeLists.txt
+++ clang-tidy/bugprone/CMakeLists.txt
@@ -25,8 +25,12 @@
   SuspiciousEnumUsageCheck.cpp
   SuspiciousMemsetUsageCheck.cpp
   SuspiciousMissingCommaCheck.cpp
+  SuspiciousSemicolonCheck.cpp
+  SuspiciousStringCompareCheck.cpp
+  SwappedArgumentsCheck.cpp
   ThrowKeywordMissingCheck.cpp
   UndefinedMemoryManipulationCheck.cpp
+  UndelegatedConstructorCheck.cpp
   UseAfterMoveCheck.cpp
   VirtualNearMissCheck.cpp
 
Index: clang-tidy/bugprone/BugproneTidyModule.cpp
===================================================================
--- clang-tidy/bugprone/BugproneTidyModule.cpp
+++ clang-tidy/bugprone/BugproneTidyModule.cpp
@@ -33,8 +33,12 @@
 #include "SuspiciousEnumUsageCheck.h"
 #include "SuspiciousMemsetUsageCheck.h"
 #include "SuspiciousMissingCommaCheck.h"
+#include "SuspiciousSemicolonCheck.h"
+#include "SuspiciousStringCompareCheck.h"
+#include "SwappedArgumentsCheck.h"
 #include "ThrowKeywordMissingCheck.h"
 #include "UndefinedMemoryManipulationCheck.h"
+#include "UndelegatedConstructorCheck.h"
 #include "UseAfterMoveCheck.h"
 #include "VirtualNearMissCheck.h"
 
@@ -91,10 +95,18 @@
         "bugprone-suspicious-memset-usage");
     CheckFactories.registerCheck<SuspiciousMissingCommaCheck>(
         "bugprone-suspicious-missing-comma");
+    CheckFactories.registerCheck<SuspiciousSemicolonCheck>(
+        "bugprone-suspicious-semicolon");
+    CheckFactories.registerCheck<SuspiciousStringCompareCheck>(
+        "bugprone-suspicious-string-compare");
+    CheckFactories.registerCheck<SwappedArgumentsCheck>(
+        "bugprone-swapped-arguments");
     CheckFactories.registerCheck<ThrowKeywordMissingCheck>(
         "bugprone-throw-keyword-missing");
     CheckFactories.registerCheck<UndefinedMemoryManipulationCheck>(
         "bugprone-undefined-memory-manipulation");
+    CheckFactories.registerCheck<UndelegatedConstructorCheck>(
+        "bugprone-undelegated-constructor");
     CheckFactories.registerCheck<UseAfterMoveCheck>(
         "bugprone-use-after-move");
     CheckFactories.registerCheck<VirtualNearMissCheck>(
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to