[Clang-tidy] modernize-use-bool-literals: documentation style.
Fix readability-redundant-control-flow warnings in regression test. llvm-svn: 269229
This commit is contained in:
parent
c1bfafd309
commit
1592d76d73
|
@ -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
|
||||
|
|
|
@ -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++
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue