[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 29 08:56:35 PDT 2025


================
@@ -3804,6 +3804,9 @@ def err_attribute_weakref_without_alias : Error<
   "weakref declaration of %0 must also have an alias attribute">;
 def err_alias_not_supported_on_darwin : Error <
   "aliases are not supported on darwin">;
+def warn_attribute_non_character_array : Warning<
+  "%0%select{ attribute|}1 only applies to fields or variables of character "
+  "array type; type here is %2">, InGroup<IgnoredAttributes>;
----------------
erichkeane wrote:

Alternatively, we often just do `(type is %)`? 

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


More information about the cfe-commits mailing list