summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/readability/ImplicitBoolCastCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] 'implicit cast' -> 'implicit conversion'Alexander Kornienko2017-08-081-390/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch renames checks, check options and changes messages to use correct term "implicit conversion" instead of "implicit cast" (which has been in use in Clang AST since ~10 years, but it's still technically incorrect w.r.t. C++ standard). * performance-implicit-cast-in-loop -> performance-implicit-conversion-in-loop * readability-implicit-bool-cast -> readability-implicit-bool-conversion - readability-implicit-bool-cast.AllowConditionalIntegerCasts -> readability-implicit-bool-conversion.AllowIntegerConditions - readability-implicit-bool-cast.AllowConditionalPointerCasts -> readability-implicit-bool-conversion.AllowPointerConditions Reviewers: hokein, jdennett Reviewed By: hokein Subscribers: mgorny, JDevlieghere, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D36456 llvm-svn: 310366
* [clang-tidy] Optimize readability-implicit-bool-cast, NFCAlexander Kornienko2017-05-161-10/+10
| | | | | | | Rearrange matchers to put the most expensive ones closer to the end. Speed up another 3-5x on some files. llvm-svn: 303187
* [clang-tidy] Optimize matchers in readability-implicit-bool-cast. NFCAlexander Kornienko2017-05-161-8/+10
| | | | | | | Don't repeat `isInTemplateInstantiation()` and `hasAncestor()` unnecessarily. This speeds up the check by a factor of up to 3 on some large files. llvm-svn: 303180
* [clang-tidy] Fix readability-implicit-bool-cast false positivesAlexander Kornienko2017-05-081-1/+2
| | | | | | | | The patch makes the check treat binary conditional operator (`x ?: y`), `while` and regular `for` loops as conditional statements for the purpose of AllowConditional*Cast options. llvm-svn: 302431
* [clang-tidy] fix readability-implicit-bool-cast false positive with xorAlexander Kornienko2017-05-041-15/+17
| | | | llvm-svn: 302164
* [clang-tidy] fix readability-implicit-bool-cast false alarm on |=, &=Alexander Kornienko2017-05-041-24/+24
| | | | llvm-svn: 302161
* [clang-tidy] Code cleanup, (almost) NFC (*).Alexander Kornienko2017-05-041-148/+91
| | | | | | | (*) Printed types of member pointers don't use elaborated type specifiers (`int struct S::*` -> `int S::*`). llvm-svn: 302160
* [clang-tidy] Expand AllowConditional*Casts to binary logical operatorsAlexander Kornienko2017-04-291-12/+22
| | | | llvm-svn: 301743
* modernize-use-auto NFC fixesPiotr Padlewski2016-12-141-1/+1
| | | | llvm-svn: 289656
* [clang-tools-extra] Format sources with clang-format. NFC.Mandeep Singh Grang2016-11-081-2/+1
| | | | | | | | | | | | | | | | Summary: Ran clang-format on all .c/.cpp/.h files in clang-tools-extra. Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories. Reviewers: klimek, alexfh Subscribers: nemanjai Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D26329 llvm-svn: 286221
* [clang-tidy] readability-implicit-bool-cast forgets to store its options.Haojian Wu2016-08-161-0/+16
| | | | | | | | | | Reviewers: alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23544 llvm-svn: 278791
* [clang-tidy] Lift common matchers to utils namespaceEtienne Bergeron2016-05-171-4/+0
| | | | | | | | | | | | | | Summary: This patch is lifting matchers used by more than one checkers to the common namespace. Reviewers: aaron.ballman, alexfh Subscribers: aaron.ballman, cfe-commits Differential Revision: http://reviews.llvm.org/D19841 llvm-svn: 269804
* [clang-tidy] Cleaning namespaces to be more consistant across checkers.Etienne Bergeron2016-05-021-0/+2
| | | | | | | | | | | | | | Summary: The goal of the patch is to bring checkers in their appropriate namespace. This path doesn't change any behavior. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19811 llvm-svn: 268264
* [clang-tidy] Cleanup some ast-matchers and lift some to utils.Etienne Bergeron2016-04-211-7/+1
| | | | | | | | | | | | | | | | Summary: Little cleanup to lift-out and to remove some frequently used ast-matchers. Some of theses matchers are candidates to be lifted to ASTMatchers.h. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19200 llvm-svn: 267003
* Drop dead return after llvm_unreachable. NFC.Benjamin Kramer2015-10-261-1/+0
| | | | llvm-svn: 251279
* assert(false) -> llvm_unreachable.Benjamin Kramer2015-10-251-1/+1
| | | | llvm-svn: 251265
* [clang-tidy] Add return value for non-assert builds.Daniel Jasper2015-10-251-0/+1
| | | | llvm-svn: 251262
* [clang-tidy] Add check readability-implicit-bool-castPiotr Dziwinski2015-10-251-0/+425
Summary: This is another check that I ported to clang-tidy from colobot-lint tool. As previously discussed on cfe-dev mailing list, this is one of those checks that I think is general and useful enough for contribution to clang-tidy. This patch contains implementation of check taken from colobot-lint, but it is extended a great deal, including FixIt hints for automated refactoring, exhaustive testcases, and user documentation. Reviewers: sbenza, aaron.ballman, alexfh Subscribers: Eugene.Zelenko Differential Revision: http://reviews.llvm.org/D13635 llvm-svn: 251235
OpenPOWER on IntegriCloud