summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-11-30 00:13:55 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-11-30 00:13:55 +0000
commit13b40bcc0322e27eaa61b459dec8f898ea1f069d (patch)
tree51a5ed63dc1f7c26db52b4132d2246b35693d45c /clang/test
parentf9b191f1356d29fa44f631a1b8454a80d28763a6 (diff)
downloadbcm5719-llvm-13b40bcc0322e27eaa61b459dec8f898ea1f069d.tar.gz
bcm5719-llvm-13b40bcc0322e27eaa61b459dec8f898ea1f069d.zip
[c++1z] Improve support for -fno-exceptions: we can't just ignore exception
specifications in this mode in C++17, since they're part of the function type, so check and diagnose them like we would if exceptions were enabled. Better ideas welcome. llvm-svn: 288220
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/builtin-exception-spec.cpp1
-rw-r--r--clang/test/SemaCXX/cxx1z-noexcept-function-type.cpp7
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/SemaCXX/builtin-exception-spec.cpp b/clang/test/SemaCXX/builtin-exception-spec.cpp
index 590cd3c35d4..9845172bcd7 100644
--- a/clang/test/SemaCXX/builtin-exception-spec.cpp
+++ b/clang/test/SemaCXX/builtin-exception-spec.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -isystem %S/Inputs -fsyntax-only -verify %s
+// RUN: %clang_cc1 -isystem %S/Inputs -fsyntax-only -verify -std=c++1z %s
// expected-no-diagnostics
#include <malloc.h>
diff --git a/clang/test/SemaCXX/cxx1z-noexcept-function-type.cpp b/clang/test/SemaCXX/cxx1z-noexcept-function-type.cpp
index d9233e681fc..105aaa92f91 100644
--- a/clang/test/SemaCXX/cxx1z-noexcept-function-type.cpp
+++ b/clang/test/SemaCXX/cxx1z-noexcept-function-type.cpp
@@ -10,10 +10,9 @@ template<typename T> void redecl1() noexcept(noexcept(T())) {} // expected-error
template<bool A, bool B> void redecl2() noexcept(A); // expected-note {{previous}}
template<bool A, bool B> void redecl2() noexcept(B); // expected-error {{conflicting types}}
-// These have the same canonical type.
-// FIXME: It's not clear whether this is supposed to be valid.
-template<typename A, typename B> void redecl3() throw(A);
-template<typename A, typename B> void redecl3() throw(B);
+// These have the same canonical type, but are still different.
+template<typename A, typename B> void redecl3() throw(A); // expected-note {{previous}}
+template<typename A, typename B> void redecl3() throw(B); // expected-error {{does not match previous}}
typedef int I;
template<bool B> void redecl4(I) noexcept(B);
OpenPOWER on IntegriCloud