[PATCH] D101721: [clang-tidy][NFC] Update tests and Default options to use boolean value

2021-05-04 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe1c729c56829: [clang-tidy][NFC] Update tests and Default 
options to use boolean value (authored by njames93).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101721/new/

https://reviews.llvm.org/D101721

Files:
  clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
  clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
  clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-argument-comment-ignore-single-argument.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-argument-comment-literals.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-argument-comment-strict.cpp
  clang-tools-extra/test/clang-tidy/checkers/bugprone-assert-side-effect.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-implicit-widening-of-multiplication-result-array-subscript-expression.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-implicit-widening-of-multiplication-result-int.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-implicit-widening-of-multiplication-result-pointer-offset.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-misplaced-widening-cast-explicit-only.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-misplaced-widening-cast-implicit-enabled.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-not-null-terminated-result-memcpy-before-safe.c
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-reserved-identifier-invert.cpp
  clang-tools-extra/test/clang-tidy/checkers/bugprone-sizeof-expression.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-enum-usage-strict.cpp
  clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-enum-usage.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-string-compare.c
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-string-compare.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-unhandled-self-assignment-warn-only-if-this-has-suspicious-field.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-macro-usage-caps-only.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-macro-usage-command-line-macros.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-narrowing-conversions-pedanticmode-option.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-narrowing-conversions.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-prefer-member-initializer-modernize-use-default-member-init-assignment.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-pro-type-member-init-use-assignment.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-special-member-functions-allow-missing-move-when-copy-is-deleted.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-special-member-functions-relaxed.cpp
  
clang-tools-extra/test/clang-tidy/checkers/hicpp-multiway-paths-covered-else.cpp
  
clang-tools-extra/test/clang-tidy/checkers/hicpp-signed-bitwise-integer-literals.cpp
  
clang-tools-extra/test/clang-tidy/checkers/misc-non-private-member-variables-in-classes.cpp
  clang-tools-extra/test/clang-tidy/checkers/misc-unused-parameters-strict.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-avoid-bind-permissive-parameter-list.cpp
  clang-tools-extra/test/clang-tidy/checkers/modernize-make-unique-macros.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-raw-string-literal-delimiter.cpp
  clang-tools-extra/test/clang-tidy/checkers/modernize-raw-string-literal.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-auto-cast-remove-stars.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-auto-min-type-name-length.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-auto-new-remove-stars.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-bool-literals-ignore-macros.cpp
  clang-tools-extra/test/clang-tidy/checkers/modernize-use-bool-literals.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-default-member-init-assignment.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-default-member-init-macros.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-emplace-ignore-implicit-constructors.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-equals-default-copy.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-equals-default-macros.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-equals-delete-macros.cpp
  clang-tools-extra/test/clang-tidy/checkers/modernize-use-noexcept-opt.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-override-allow-override-and-final.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-override-no-destructors.cpp
  

[PATCH] D101721: [clang-tidy][NFC] Update tests and Default options to use boolean value

2021-05-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment.

In D101721#2733279 , @aaron.ballman 
wrote:

> That makes sense to me. Should we file a bug to suggest adding the 
> deprecation warning in Clang 14(?) and planned removal in Clang 16(?) so that 
> we don't lose track of this? (I have no firm opinion about which versions we 
> decide to start deprecating and remove so long as they're not disruptive.)

I was thinking later tbh. clang-tidy 11 is where the spelling support was 
adopted and, more importantly, emitting a warning when a present key could not 
be parsed. Giving 3 years from there puts a deprecation notice in Clang17 
(Assuming we stick to the same semiannual release cycle).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101721/new/

https://reviews.llvm.org/D101721

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101721: [clang-tidy][NFC] Update tests and Default options to use boolean value

2021-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment.

In D101721#2733260 , @njames93 wrote:

> In D101721#2733173 , @aaron.ballman 
> wrote:
>
>> In D101721#2733169 , @njames93 
>> wrote:
>>
>>> However in a few years once we can be confident most users are using 
>>> clang-tidy-11 or newer, it may be wise to drop support for 0 and 1 in order 
>>> to be inline with yaml completely.
>>
>> I think if we want to go that route (which seems sensible to me), we should 
>> start warning on using anything but true/false as being deprecated. WDYT?
>
> That's sort of the plan, however we shouldn't make that change right away as 
> there's no point in issuing warnings at this time. As configurations are 
> checked in there is likely to be people still using 10 and previous, which 
> don't support the new spelling. This means the config can't be updated and 
> users with newer clang-tidy versions will get a warning they can't silence.

That makes sense to me. Should we file a bug to suggest adding the deprecation 
warning in Clang 14(?) and planned removal in Clang 16(?) so that we don't lose 
track of this? (I have no firm opinion about which versions we decide to start 
deprecating and remove so long as they're not disruptive.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101721/new/

https://reviews.llvm.org/D101721

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101721: [clang-tidy][NFC] Update tests and Default options to use boolean value

2021-05-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment.

In D101721#2733173 , @aaron.ballman 
wrote:

> In D101721#2733169 , @njames93 
> wrote:
>
>> However in a few years once we can be confident most users are using 
>> clang-tidy-11 or newer, it may be wise to drop support for 0 and 1 in order 
>> to be inline with yaml completely.
>
> I think if we want to go that route (which seems sensible to me), we should 
> start warning on using anything but true/false as being deprecated. WDYT?

That's sort of the plan, however we shouldn't make that change right away as 
there's no point in issuing warnings at this time. As configurations are 
checked in there is likely to be people still using 10 and previous, which 
don't support the new spelling. This means the config can't be updated and 
users with newer clang-tidy versions will get a warning they can't silence.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101721/new/

https://reviews.llvm.org/D101721

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101721: [clang-tidy][NFC] Update tests and Default options to use boolean value

2021-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment.

In D101721#2733169 , @njames93 wrote:

> In D101721#2733125 , @aaron.ballman 
> wrote:
>
>> LGTM! One thing I'd like to be sure of though -- do we still have at least 
>> one test that's showing you can use false/0 and true/1/nonzero 
>> interchangeably? If not, we should probably have one that shows which 
>> "alternate forms" are accepted.
>
> `clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp::CheckOptionsValidation::ValidIntOptions`
>  contains a test which supports 0 and 1.

Awesome, thank you for verifying!

> However in a few years once we can be confident most users are using 
> clang-tidy-11 or newer, it may be wise to drop support for 0 and 1 in order 
> to be inline with yaml completely.

I think if we want to go that route (which seems sensible to me), we should 
start warning on using anything but true/false as being deprecated. WDYT?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101721/new/

https://reviews.llvm.org/D101721

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101721: [clang-tidy][NFC] Update tests and Default options to use boolean value

2021-05-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment.

In D101721#2733125 , @aaron.ballman 
wrote:

> LGTM! One thing I'd like to be sure of though -- do we still have at least 
> one test that's showing you can use false/0 and true/1/nonzero 
> interchangeably? If not, we should probably have one that shows which 
> "alternate forms" are accepted.

`clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp::CheckOptionsValidation::ValidIntOptions`
 contains a test which supports 0 and 1. 
However in a few years once we can be confident most users are using 
clang-tidy-11 or newer, it may be wise to drop support for 0 and 1 in order to 
be inline with yaml completely.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101721/new/

https://reviews.llvm.org/D101721

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101721: [clang-tidy][NFC] Update tests and Default options to use boolean value

2021-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM! One thing I'd like to be sure of though -- do we still have at least one 
test that's showing you can use false/0 and true/1/nonzero interchangeably? If 
not, we should probably have one that shows which "alternate forms" are 
accepted.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101721/new/

https://reviews.llvm.org/D101721

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101721: [clang-tidy][NFC] Update tests and Default options to use boolean value

2021-05-02 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision.
njames93 added a reviewer: aaron.ballman.
Herald added subscribers: kbarton, xazax.hun, nemanjai.
njames93 requested review of this revision.
Herald added subscribers: cfe-commits, aheejin.
Herald added a project: clang-tools-extra.

Change instances where options which are boolean are assigned the value 1|0 to 
use true|false instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101721

Files:
  clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
  clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
  clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-argument-comment-ignore-single-argument.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-argument-comment-literals.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-argument-comment-strict.cpp
  clang-tools-extra/test/clang-tidy/checkers/bugprone-assert-side-effect.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-implicit-widening-of-multiplication-result-array-subscript-expression.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-implicit-widening-of-multiplication-result-int.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-implicit-widening-of-multiplication-result-pointer-offset.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-misplaced-widening-cast-explicit-only.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-misplaced-widening-cast-implicit-enabled.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-not-null-terminated-result-memcpy-before-safe.c
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-reserved-identifier-invert.cpp
  clang-tools-extra/test/clang-tidy/checkers/bugprone-sizeof-expression.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-enum-usage-strict.cpp
  clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-enum-usage.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-string-compare.c
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-string-compare.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone-unhandled-self-assignment-warn-only-if-this-has-suspicious-field.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-macro-usage-caps-only.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-macro-usage-command-line-macros.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-narrowing-conversions-pedanticmode-option.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-narrowing-conversions.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-prefer-member-initializer-modernize-use-default-member-init-assignment.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-pro-type-member-init-use-assignment.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-special-member-functions-allow-missing-move-when-copy-is-deleted.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-special-member-functions-relaxed.cpp
  
clang-tools-extra/test/clang-tidy/checkers/hicpp-multiway-paths-covered-else.cpp
  
clang-tools-extra/test/clang-tidy/checkers/hicpp-signed-bitwise-integer-literals.cpp
  
clang-tools-extra/test/clang-tidy/checkers/misc-non-private-member-variables-in-classes.cpp
  clang-tools-extra/test/clang-tidy/checkers/misc-unused-parameters-strict.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-avoid-bind-permissive-parameter-list.cpp
  clang-tools-extra/test/clang-tidy/checkers/modernize-make-unique-macros.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-raw-string-literal-delimiter.cpp
  clang-tools-extra/test/clang-tidy/checkers/modernize-raw-string-literal.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-auto-cast-remove-stars.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-auto-min-type-name-length.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-auto-new-remove-stars.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-bool-literals-ignore-macros.cpp
  clang-tools-extra/test/clang-tidy/checkers/modernize-use-bool-literals.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-default-member-init-assignment.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-default-member-init-macros.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-emplace-ignore-implicit-constructors.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-equals-default-copy.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-equals-default-macros.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-equals-delete-macros.cpp
  clang-tools-extra/test/clang-tidy/checkers/modernize-use-noexcept-opt.cpp
  
clang-tools-extra/test/clang-tidy/checkers/modernize-use-override-allow-override-and-final.cpp