[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

Devon Loehr via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 29 11:19:13 PST 2025


================
@@ -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 "
----------------
DKLoehr wrote:

I like this more.

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


More information about the cfe-commits mailing list