[PATCH] D56731: Add -Wimplicit-ctad warning to diagnose CTAD on types with no user defined deduction guides.
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 15 10:27:47 PST 2019
lebedev.ri added inline comments.
================
Comment at: include/clang/Basic/DiagnosticGroups.td:1054
+
+def ImplicitCTADUsage : DiagGroup<"implicit-ctad">;
----------------
Should this be in some group?
Alternatively, would it make sense to add it to new `-Wctad` group?
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2129
+def warn_class_template_argument_deduction_no_user_defined_guides : Warning<
+ "class template argument deduction for %0 that has no user defined deduction guides" >,
+ InGroup<ImplicitCTADUsage>, DefaultIgnore;
----------------
`class template argument deduction <was used? happened?> for %0 that has no user`
the sentence looks incomplete to me.
================
Comment at: lib/Sema/SemaInit.cpp:9443
+
+ // -Wimplicit-ctad: Warn if CTAD was used on a
+ if (!HasUserDeclaredDeductionGuideCandidate) {
----------------
on a .... ?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56731/new/
https://reviews.llvm.org/D56731
More information about the cfe-commits
mailing list