Skip to content

Commit d5a1823

Browse files
committed
fix: add requested changes
1 parent 1daa37c commit d5a1823

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6339,18 +6339,13 @@ def warn_c2y_compat_internal_in_extern_inline : Warning<
63396339
"using static %select{function|variable}0 %1 in an inline function with "
63406340
"external linkage is incompatible with standards before C2y">,
63416341
InGroup<CPre2yCompat>, DefaultIgnore;
6342-
def ext_static_local_in_extern_inline
6343-
: ExtWarn<"non-constant static local variable in an inline function with "
6344-
"external linkage is a C2y extension">,
6345-
InGroup<StaticLocalInInline>;
6346-
def ext_static_local_in_extern_inline_quiet
6347-
: Extension<ext_static_local_in_extern_inline.Summary>,
6348-
InGroup<StaticLocalInInline>;
6349-
def warn_c2y_compat_static_local_in_extern_inline
6350-
: Warning<"non-constant static local variable in an inline function with "
6351-
"external linkage is incompatible with standards before C2y">,
6352-
InGroup<CPre2yCompat>,
6353-
DefaultIgnore;
6342+
def ext_static_local_in_extern_inline : ExtWarn<
6343+
"non-constant static local variable in an inline function with "
6344+
"external linkage is a C2y extension">, InGroup<StaticLocalInInline>;
6345+
def warn_c2y_compat_static_local_in_extern_inline : Warning<
6346+
"non-constant static local variable in an inline function with "
6347+
"external linkage is incompatible with standards before C2y">,
6348+
InGroup<CPre2yCompat>, DefaultIgnore;
63546349
def note_convert_inline_to_static : Note<
63556350
"use 'static' to give inline function %0 internal linkage">;
63566351

clang/lib/Sema/SemaDecl.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8128,8 +8128,6 @@ NamedDecl *Sema::ActOnVariableDeclarator(
81288128
unsigned DiagID;
81298129
if (getLangOpts().C2y)
81308130
DiagID = diag::warn_c2y_compat_static_local_in_extern_inline;
8131-
else if (getSourceManager().isInMainFile(D.getBeginLoc()))
8132-
DiagID = diag::ext_static_local_in_extern_inline_quiet;
81338131
else
81348132
DiagID = diag::ext_static_local_in_extern_inline;
81358133

0 commit comments

Comments
 (0)