diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-10-30 18:05:10 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-10-30 18:05:10 +0000 |
| commit | 70a81b1e8b5e9e9ea70623f4e7f3504fc00da46d (patch) | |
| tree | eb47972f07e2238ff4f2eb5ddf76a36cd3fdd4b8 | |
| parent | 96da9fa4ca74b98acfbca63b59fb17c469cbad1c (diff) | |
| download | bcm5719-llvm-70a81b1e8b5e9e9ea70623f4e7f3504fc00da46d.tar.gz bcm5719-llvm-70a81b1e8b5e9e9ea70623f4e7f3504fc00da46d.zip | |
Add a test to make sure that -Wdeprecated doesn't warn on use of 'throw()' in system headers (deprecated in C++17).
llvm-svn: 316935
| -rw-r--r-- | clang/test/SemaCXX/cxx1z-noexcept-function-type.cpp | 4 | ||||
| -rw-r--r-- | clang/test/SemaCXX/deprecated.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/cxx1z-noexcept-function-type.cpp b/clang/test/SemaCXX/cxx1z-noexcept-function-type.cpp index 6578eb89b0b..bd3d031f587 100644 --- a/clang/test/SemaCXX/cxx1z-noexcept-function-type.cpp +++ b/clang/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/clang/test/SemaCXX/deprecated.cpp b/clang/test/SemaCXX/deprecated.cpp index 26f30c91b09..a838cda7c42 100644 --- a/clang/test/SemaCXX/deprecated.cpp +++ b/clang/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(); |

