New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
google-explicit-constructor warns when explicit(false) is used #53115
Comments
@llvm/issue-subscribers-clang-tidy |
Put https://reviews.llvm.org/D117593 up for review |
@llvm/issue-subscribers-c-20 |
Maybe add also an option to either activate or deactivate the new behavior. Depending on which is chosen as default. LGTM so far, but shouldn't all early returns like the following above/before the fixup/message construction?
|
Maybe I should add an option instead. explict(false) CTor(int) {} Transformed to explicit(false) explicit Ctor(int) {} Instead it should either be explicit(true) Ctor(int) {}
// Or more favourable
explicit Ctor(int) {} |
FWIW: I prefer |
explicit(false)
can be seen as a signal that the developer considered theexplicit
case and determined that, in this instance,explicit
is not warranted. Warning whenexplicit(false)
is set forces aNOLINT
that duplicates information already available in the syntax. Seen onclang-tidy-14
.https://godbolt.org/z/4dojdv3s3
The text was updated successfully, but these errors were encountered: