summaryrefslogtreecommitdiff
path: root/test/SemaCXX/deprecated.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/deprecated.cpp')
-rw-r--r--test/SemaCXX/deprecated.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/SemaCXX/deprecated.cpp b/test/SemaCXX/deprecated.cpp
index 26f30c91b0980..773085bf2b965 100644
--- a/test/SemaCXX/deprecated.cpp
+++ b/test/SemaCXX/deprecated.cpp
@@ -20,7 +20,12 @@ void i() throw(...);
// expected-warning@-8 {{dynamic exception specifications are deprecated}} expected-note@-8 {{use 'noexcept(false)' instead}}
#endif
-void stuff() {
+void stuff(register int q) {
+#if __cplusplus > 201402L
+ // expected-error@-2 {{ISO C++17 does not allow 'register' storage class specifier}}
+#elif __cplusplus >= 201103L && !defined(NO_DEPRECATED_FLAGS)
+ // expected-warning@-4 {{'register' storage class specifier is deprecated}}
+#endif
register int n;
#if __cplusplus > 201402L
// expected-error@-2 {{ISO C++17 does not allow 'register' storage class specifier}}
@@ -93,3 +98,6 @@ namespace DeprecatedCopy {
void g() { c1 = c2; } // expected-note {{implicit copy assignment operator for 'DeprecatedCopy::Dtor' first required here}}
}
#endif
+
+# 1 "/usr/include/system-header.h" 1 3
+void system_header_function(void) throw();