llvm-project/clang-tools-extra/clang-tidy
Kirill Bobyrev 75de8968b6 [clang-tidy] enhance modernize-use-bool-literals to check ternary operator
modernize-use-bool-literals doesn't checks operands in ternary operator.

For example:

``` c++
static int Value = 1;

bool foo() {
  bool Result = Value == 1 ? 1 : 0;
  return Result;
}

bool boo() {
  return Value == 1 ? 1 : 0;
}
```

This issue was reported in bug 28854. The patch fixes it.

Reviewers: alexfh, aaron.ballman, Prazek

Subscribers: Prazek, Eugene.Zelenko

Differential Revision: https://reviews.llvm.org/D23243

llvm-svn: 278022
2016-08-08 17:11:56 +00:00
..
boost [clang-tidy] boost-use-to-string arg expr location bugfix 2016-06-28 08:16:20 +00:00
cert [clang-tidy] remove trailing whitespaces and retab 2016-08-01 12:06:18 +00:00
cppcoreguidelines [clang-tidy] Fix segfault in cppcore-guidelines-special-member-functions check 2016-08-02 21:18:37 +00:00
google Apply performance-unnecessary-value-param to clang-tidy. 2016-06-15 15:46:10 +00:00
llvm Fix clang-tidy patterns to adapt to newly added ExprWithCleanups nodes. 2016-06-21 20:11:20 +00:00
misc [clang-tidy] misc-argument-comment non-strict mode 2016-08-04 14:54:54 +00:00
modernize [clang-tidy] enhance modernize-use-bool-literals to check ternary operator 2016-08-08 17:11:56 +00:00
mpi [extra-tools] Fix extra tools build bot warnings due to incorrect doc 2016-08-03 06:59:46 +00:00
performance [clang-tidy] Inefficient string operation 2016-08-03 23:06:03 +00:00
plugin [clang-tidy] MPITypeMismatchCheck 2016-08-02 20:29:35 +00:00
readability Sorting includes; NFC. 2016-07-29 21:41:18 +00:00
tool [clang-tidy] MPITypeMismatchCheck 2016-08-02 20:29:35 +00:00
utils [clang-tidy] Fixes to modernize-use-emplace 2016-07-29 02:10:23 +00:00
CMakeLists.txt [clang-tidy] MPITypeMismatchCheck 2016-08-02 20:29:35 +00:00
ClangTidy.cpp Reapply r276973 "Adjust Registry interface to not require plugins to export a registry" 2016-08-05 11:01:08 +00:00
ClangTidy.h [clang-tidy] misc-argument-comment non-strict mode 2016-08-04 14:54:54 +00:00
ClangTidyDiagnosticConsumer.cpp Changes related to new implementation of tooling::Replacements as class. 2016-08-01 10:16:39 +00:00
ClangTidyDiagnosticConsumer.h [clang-tidy] Switch to a more common way of customizing check behavior. 2016-05-20 13:42:40 +00:00
ClangTidyModule.cpp Apply performance-unnecessary-value-param to clang-tidy. 2016-06-15 15:46:10 +00:00
ClangTidyModule.h Revert "Apply modernize-use-default to clang-tools-extra." 2015-10-20 21:45:52 +00:00
ClangTidyModuleRegistry.h Reapply r276973 "Adjust Registry interface to not require plugins to export a registry" 2016-08-05 11:01:08 +00:00
ClangTidyOptions.cpp [clang-tidy] Pass absolute path to OptionsProvider::getOptions/getRawOptions. 2016-07-11 07:47:04 +00:00
ClangTidyOptions.h [ClangTidy] Add an 'explain-checks' option to diagnose where each checks comes from. 2016-04-27 09:15:01 +00:00
add_new_check.py [clang-tidy] Remove redundant quote in add_new_check script 2016-05-30 15:42:08 +00:00
rename_check.py [clang-tidy] Python script for easy check rename 2015-10-11 07:58:34 +00:00