[clang] de31b5c - Update status of WG21 DR1042
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 6 05:35:20 PST 2023
Author: Aaron Ballman
Date: 2023-02-06T08:34:31-05:00
New Revision: de31b5cf0ae6b22ea7f71b4cbe1c21e543726020
URL: https://github.com/llvm/llvm-project/commit/de31b5cf0ae6b22ea7f71b4cbe1c21e543726020
DIFF: https://github.com/llvm/llvm-project/commit/de31b5cf0ae6b22ea7f71b4cbe1c21e543726020.diff
LOG: Update status of WG21 DR1042
We've supported attributes on alias declarations at least as far back
as Clang 3.5 from my testing. This also updates the RUN lines to test
the newer language modes as well.
Added:
Modified:
clang/test/CXX/drs/dr10xx.cpp
clang/www/cxx_dr_status.html
Removed:
################################################################################
diff --git a/clang/test/CXX/drs/dr10xx.cpp b/clang/test/CXX/drs/dr10xx.cpp
index f629280c3d981..4d49a1859c2f5 100644
--- a/clang/test/CXX/drs/dr10xx.cpp
+++ b/clang/test/CXX/drs/dr10xx.cpp
@@ -1,7 +1,9 @@
// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
// RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
-// RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++20 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++2b %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
namespace std {
__extension__ typedef __SIZE_TYPE__ size_t;
@@ -83,3 +85,16 @@ namespace dr1070 { // dr1070: 3.5
C c = {};
#endif
}
+
+namespace dr1042 { // dr1042: 3.5
+#if __cplusplus >= 201402L
+ // C++14 added an attribute that we can test the semantics of.
+ using foo [[deprecated]] = int; // expected-note {{'foo' has been explicitly marked deprecated here}}
+ foo f = 12; // expected-warning {{'foo' is deprecated}}
+#elif __cplusplus >= 201103L
+ // C++11 did not have any attributes that could be applied to an alias
+ // declaration, so the best we can test is that we accept an empty attribute
+ // list in this mode.
+ using foo [[]] = int;
+#endif
+}
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index b54c65e034066..dbd4e34816f98 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -6059,7 +6059,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
<td><a href="https://wg21.link/cwg1042">1042</a></td>
<td>C++11</td>
<td>Attributes in <I>alias-declaration</I>s</td>
- <td class="none" align="center">Unknown</td>
+ <td class="full" align="center">3.5</td>
</tr>
<tr id="1043">
<td><a href="https://wg21.link/cwg1043">1043</a></td>
More information about the cfe-commits
mailing list