From: Aaron Ballman Date: Mon, 22 Jul 2019 12:49:28 +0000 (+0000) Subject: Revert the change to the [[nodiscard]] feature test macro value. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f30586d208f878f51297375dcb7dabfe694a53c3;p=clang Revert the change to the [[nodiscard]] feature test macro value. This value only gets bumped once both P1301 and P1771 are implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366682 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index 7d8dbb196e..2d95c230d8 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -2335,7 +2335,7 @@ def WarnUnused : InheritableAttr { } def WarnUnusedResult : InheritableAttr { - let Spellings = [CXX11<"", "nodiscard", 201907>, C2x<"", "nodiscard">, + let Spellings = [CXX11<"", "nodiscard", 201603>, C2x<"", "nodiscard">, CXX11<"clang", "warn_unused_result">, GCC<"warn_unused_result">]; let Subjects = SubjectList<[ObjCMethod, Enum, Record, FunctionLike]>; diff --git a/test/Preprocessor/has_attribute.cpp b/test/Preprocessor/has_attribute.cpp index 83ee0e3c6c..d35b673e68 100644 --- a/test/Preprocessor/has_attribute.cpp +++ b/test/Preprocessor/has_attribute.cpp @@ -63,7 +63,7 @@ CXX11(unlikely) // CHECK: maybe_unused: 201603L // ITANIUM: no_unique_address: 201803L // WINDOWS: no_unique_address: 0 -// CHECK: nodiscard: 201907L +// CHECK: nodiscard: 201603L // CHECK: noreturn: 200809L // FIXME(201803L) CHECK: unlikely: 0