summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorRichard Smith <richard@metafoo.co.uk>2019-12-04 17:31:58 -0800
committerRichard Smith <richard@metafoo.co.uk>2019-12-04 18:55:23 -0800
commita1d2611c046efa46cf32a10c9e9a8a7a8a06feba (patch)
tree00e6404b67ed982a1a65456b1a883bea4284c0c2 /clang/test
parent039d4b3aa20a8f36ad058f2b9692b73c6909c612 (diff)
downloadbcm5719-llvm-a1d2611c046efa46cf32a10c9e9a8a7a8a06feba.tar.gz
bcm5719-llvm-a1d2611c046efa46cf32a10c9e9a8a7a8a06feba.zip
[c++17] Fix assert / wrong code when passing a noexcept pointer to
member function to a non-noexcept pointer to member non-type template parameter.
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp b/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp
index d73a88777d0..7a58dd5dcae 100644
--- a/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp
+++ b/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp
@@ -393,3 +393,12 @@ namespace PR42362 {
template<auto (&...F)()> struct Z<F...>::Q {};
Z<f, f, f>::Q q;
}
+
+namespace FunctionConversion {
+ struct a { void c(char *) noexcept; };
+ template<void (a::*f)(char*)> void g() {
+ using T = decltype(f);
+ using T = void (a::*)(char*); // (not 'noexcept')
+ }
+ template void g<&a::c>();
+}
OpenPOWER on IntegriCloud