================
@@ -6153,6 +6153,15 @@ def warn_static_local_in_extern_inline : Warning<
 def note_convert_inline_to_static : Note<
   "use 'static' to give inline function %0 internal linkage">;
 
+def warn_possible_object_duplication_mutable : Warning<
+  "%0 is mutable, has hidden visibility, and external linkage; it may be "
----------------
zmodem wrote:

I do think leading with the main issue, and then elaborating would be better. 
That may allow the reader to understand the problem quicker, is clearer if 
scrolling is required to read the tail of the message, etc.

I also think there's precedent. Here are two fairly random examples:

```
def warn_builtin_chk_overflow : Warning<
  "'%0' will always overflow; destination buffer has size %1,"
  " but size argument is %2">,
  InGroup<DiagGroup<"builtin-memcpy-chk-size">>;

def err_for_range_invalid: Error<
  "invalid range expression of type %0; no viable '%select{begin|end}1' "
  "function available">;
```

https://github.com/llvm/llvm-project/pull/117622
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to