Author: rsmith Date: Fri Oct 21 20:32:45 2016 New Revision: 284906 URL: http://llvm.org/viewvc/llvm-project?rev=284906&view=rev Log: Add another testcase missed from r284905.
Added: cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p4.cpp Added: cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p4.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p4.cpp?rev=284906&view=auto ============================================================================== --- cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p4.cpp (added) +++ cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p4.cpp Fri Oct 21 20:32:45 2016 @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -std=c++1z -verify %s + +void f() noexcept; +void (&r)() = f; +void (&s)() noexcept = r; // expected-error {{cannot bind}} + +void (&cond1)() noexcept = true ? r : f; // expected-error {{cannot bind}} +void (&cond2)() noexcept = true ? f : r; // expected-error {{cannot bind}} +// FIXME: Strictly, the rules in p4 don't allow this, because the operand types +// are not of the same type other than cv-qualifiers, but we consider that to +// be a defect, and instead allow reference-compatible types here. +void (&cond3)() = true ? r : f; +void (&cond4)() = true ? f : r; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits