================
@@ -6588,7 +6588,11 @@ def err_inline_decl_follows_def : Error<
 def err_inline_declaration_block_scope : Error<
   "inline declaration of %0 not allowed in block scope">;
 def err_static_non_static : Error<
-  "static declaration of %0 follows non-static declaration">;
+  "static declaration of %0 follows non-static declaration"
+  "%select{|; behavior is undefined}1">;
+def err_internal_extern_mismatch : Error<
+  "variable %0 declared with both internal and external linkage "
----------------
Endilll wrote:

I find it unfortunate that this diagnostic says "one declarations has internal 
linkage, but the other one has external linkage", without telling which is 
which (it's followed by a generic "previous declaration here" note). At first I 
wanted to suggest a better note wording, but then I realized that we should 
just mirror the "static declaration follows non-static declaration" wording of 
the existing diagnostic, and keep the generic note as is.

@AaronBallman thoughts?

https://github.com/llvm/llvm-project/pull/193567
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to