Detect constructors taking a single std::initializer_list even when it
is instantiation-dependent.
Details
- Reviewers
djasper - Commits
- rGdd2dad0d24f0: [clang-tidy] Detect dependent initializer_lists in google-explicit-constructor.
rCTE228289: [clang-tidy] Detect dependent initializer_lists in google-explicit-constructor.
rL228289: [clang-tidy] Detect dependent initializer_lists in google-explicit-constructor.
Diff Detail
Event Timeline
Looks good.
clang-tidy/google/ExplicitConstructorCheck.cpp | ||
---|---|---|
58–59 | I am fine with removing the extra-check here as I don't think it'll lead to a significant amount of false negatives, but please mention that in the patch description. | |
test/clang-tidy/google-explicit-constructor.cpp | ||
66 | I recommend not checking the full error message every time. It is just too much churn if the warning gets changed. |
Addressed review comments.
clang-tidy/google/ExplicitConstructorCheck.cpp | ||
---|---|---|
58–59 | The main reason to remove the qualified name comparison was to make the check consistent with the newly added handling of instantiation-dependent argument types (where I was lazy to check qualified name). After thinking a bit, I'll better make both consistent in a different way. PTAL. | |
test/clang-tidy/google-explicit-constructor.cpp | ||
66 | You're right. I removed the check name, but I can make the patterns even shorter. |
I am fine with removing the extra-check here as I don't think it'll lead to a significant amount of false negatives, but please mention that in the patch description.