From: Richard Smith Date: Mon, 30 Oct 2017 18:05:10 +0000 (+0000) Subject: Add a test to make sure that -Wdeprecated doesn't warn on use of 'throw()' in system... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c7bbb9e3c20aac63ad2056f54ab8be32253c2af;p=clang Add a test to make sure that -Wdeprecated doesn't warn on use of 'throw()' in system headers (deprecated in C++17). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316935 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaCXX/cxx1z-noexcept-function-type.cpp b/test/SemaCXX/cxx1z-noexcept-function-type.cpp index 6578eb89b0..bd3d031f58 100644 --- a/test/SemaCXX/cxx1z-noexcept-function-type.cpp +++ b/test/SemaCXX/cxx1z-noexcept-function-type.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -std=c++14 -verify -fexceptions -fcxx-exceptions %s -// RUN: %clang_cc1 -std=c++1z -verify -fexceptions -fcxx-exceptions %s -Wno-dynamic-exception-spec +// RUN: %clang_cc1 -std=c++17 -verify -fexceptions -fcxx-exceptions %s -Wno-dynamic-exception-spec // RUN: %clang_cc1 -std=c++14 -verify -fexceptions -fcxx-exceptions -Wno-c++1z-compat-mangling -DNO_COMPAT_MANGLING %s -// RUN: %clang_cc1 -std=c++14 -verify -fexceptions -fcxx-exceptions -Wno-noexcept-type -DNO_COMPAT_MANGLING %s +// RUN: %clang_cc1 -std=c++17 -verify -fexceptions -fcxx-exceptions -Wno-noexcept-type -DNO_COMPAT_MANGLING %s #if __cplusplus > 201402L diff --git a/test/SemaCXX/deprecated.cpp b/test/SemaCXX/deprecated.cpp index 26f30c91b0..a838cda7c4 100644 --- a/test/SemaCXX/deprecated.cpp +++ b/test/SemaCXX/deprecated.cpp @@ -93,3 +93,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();