================
@@ -6339,9 +6339,18 @@ def warn_c2y_compat_internal_in_extern_inline : Warning<
"using static %select{function|variable}0 %1 in an inline function with "
"external linkage is incompatible with standards before C2y">,
InGroup<CPre2yCompat>, DefaultIgnore;
-def warn_static_local_in_extern_inline : Warning<
- "non-constant static local variable in inline function may be different "
- "in different files">, InGroup<StaticLocalInInline>;
+def ext_static_local_in_extern_inline
+ : ExtWarn<"non-constant static local variable in an inline function with "
+ "external linkage is a C2y extension">,
+ InGroup<StaticLocalInInline>;
+def ext_static_local_in_extern_inline_quiet
+ : Extension<ext_static_local_in_extern_inline.Summary>,
+ InGroup<StaticLocalInInline>;
+def warn_c2y_compat_static_local_in_extern_inline
+ : Warning<"non-constant static local variable in an inline function with "
+ "external linkage is incompatible with standards before C2y">,
+ InGroup<CPre2yCompat>,
+ DefaultIgnore;
----------------
AaronBallman wrote:
clang-format does unfortunate things to .td files, so you should format this
manually.
```suggestion
def ext_static_local_in_extern_inline : ExtWarn<
"non-constant static local variable in an inline function with external "
"linkage is a C2y extension">, InGroup<StaticLocalInInline>;
def ext_static_local_in_extern_inline_quiet : Extension<
ext_static_local_in_extern_inline.Summary>,
InGroup<StaticLocalInInline>;
def warn_c2y_compat_static_local_in_extern_inline : Warning<
"non-constant static local variable in an inline function with external "
"linkage is incompatible with standards before C2y">,
InGroup<CPre2yCompat>, DefaultIgnore;
```
https://github.com/llvm/llvm-project/pull/167086
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits