Skip to content

Commit ea65415

Browse files
committed
Remove some FIXMEs that no longer apply; NFC
Noticed these while doing a review on changes in the area, but C23 added support for nodiscard with a message, so it's not an extension we need to diagnose.
1 parent 567d164 commit ea65415

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,18 +2912,14 @@ static void handleWarnUnusedResult(Sema &S, Decl *D, const ParsedAttr &AL) {
29122912

29132913
// If this is spelled as the standard C++17 attribute, but not in C++17,
29142914
// warn about using it as an extension. If there are attribute arguments,
2915-
// then claim it's a C++20 extension instead.
2916-
// FIXME: If WG14 does not seem likely to adopt the same feature, add an
2917-
// extension warning for C23 mode.
2915+
// then claim it's a C++20 extension instead. C23 supports this attribute
2916+
// with the message; no extension warning is needed there beyond the one
2917+
// already issued for accepting attributes in older modes.
29182918
const LangOptions &LO = S.getLangOpts();
29192919
if (AL.getNumArgs() == 1) {
29202920
if (LO.CPlusPlus && !LO.CPlusPlus20)
29212921
S.Diag(AL.getLoc(), diag::ext_cxx20_attr) << AL;
29222922

2923-
// Since this is spelled [[nodiscard]], get the optional string
2924-
// literal. If in C++ mode, but not in C++20 mode, diagnose as an
2925-
// extension.
2926-
// FIXME: C23 should support this feature as well, even as an extension.
29272923
if (!S.checkStringLiteralArgumentAttr(AL, 0, Str, nullptr))
29282924
return;
29292925
} else if (LO.CPlusPlus && !LO.CPlusPlus17)

0 commit comments

Comments
 (0)