// 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;
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
+}
<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>