[clang] [clang][Sema] Refine unused-member-function diagnostic message for constructors (PR #84515)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 25 06:01:44 PDT 2024
================
@@ -402,7 +402,7 @@ def warn_unused_function : Warning<"unused function %0">,
InGroup<UnusedFunction>, DefaultIgnore;
def warn_unused_template : Warning<"unused %select{function|variable}0 template %1">,
InGroup<UnusedTemplate>, DefaultIgnore;
-def warn_unused_member_function : Warning<"unused member function %0">,
+def warn_unused_member_function : Warning<"unused %select{constructor|member function %1}0">,
----------------
AaronBallman wrote:
I would recommend using `%sub{select_special_member_kind}1` instead of manually spelling out constructor; see `note_member_synthesized_at` for an example of it being used.
https://github.com/llvm/llvm-project/pull/84515
More information about the cfe-commits
mailing list