[clang] [Clang] include attribute scope in diagnostics (PR #144619)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 26 04:28:32 PDT 2025


================
@@ -3275,10 +3275,11 @@ def err_attribute_wrong_number_arguments : Error<
 def err_attribute_wrong_number_arguments_for : Error <
   "%0 attribute references function %1, which %plural{0:takes no arguments|1:takes one argument|"
   ":takes exactly %2 arguments}2">;
-def err_callback_attribute_wrong_arg_count : Error<
-  "'callback' attribute references function of type %0 which expects %1 "
-  "%plural{1:argument|:arguments}1 but attribute specifies %2 parameter index "
-  "%plural{1:argument|:arguments}2">;
+def err_callback_attribute_wrong_arg_count
----------------
AaronBallman wrote:

We should probably rename the diagnostic now that it's no longer hard-coding `callback`. Maybe `err_attribute_wrong_arg_count_for_func`?

https://github.com/llvm/llvm-project/pull/144619


More information about the cfe-commits mailing list