diff options
3 files changed, 2 insertions, 6 deletions
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index 94ba16d6366..4233874b42d 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -199,7 +199,7 @@ identified. The improvements since the 3.8 release include: - New `modernize-use-bool-literals <http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html>`_ check - Finds integer literals which are cast to bool. + Finds integer literals which are cast to ``bool``. - New `performance-faster-string-find <http://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html>`_ check diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-bool-literals.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-bool-literals.rst index a8d73c359e4..d547af50a81 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-bool-literals.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-bool-literals.rst @@ -3,7 +3,7 @@ modernize-use-bool-literals =========================== -Finds integer literals which are cast to bool. +Finds integer literals which are cast to ``bool``. .. code-block:: c++ diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-bool-literals.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-bool-literals.cpp index dbbb1628075..8ba516d7eca 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-use-bool-literals.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-use-bool-literals.cpp @@ -34,7 +34,6 @@ bool MacroIntToTrue = TRUE_MACRO; #define FALSE_MACRO bool(0) // CHECK-FIXES: {{^}}#define FALSE_MACRO bool(0){{$}} - bool TrueBool = true; // OK bool FalseBool = bool(FALSE_MACRO); @@ -83,14 +82,12 @@ template<typename type> void templateFunction(type) { type TemplateType = 0; // CHECK-FIXES: {{^ *}}type TemplateType = 0;{{$}} - return; } template<int c> void valueDependentTemplateFunction() { bool Boolean = c; // CHECK-FIXES: {{^ *}}bool Boolean = c;{{$}} - return; } template<typename type> @@ -98,7 +95,6 @@ void anotherTemplateFunction(type) { bool JustBool = 0; // CHECK-MESSAGES: :[[@LINE-1]]:19: warning: {{.*}} // CHECK-FIXES: {{^ *}}bool JustBool = false;{{$}} - return; } int main() { |

