Author: ericwf Date: Thu Apr 13 00:27:55 2017 New Revision: 300175 URL: http://llvm.org/viewvc/llvm-project?rev=300175&view=rev Log: Cleanup any_cast failure test
Modified: libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp Modified: libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp?rev=300175&r1=300174&r2=300175&view=diff ============================================================================== --- libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp (original) +++ libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp Thu Apr 13 00:27:55 2017 @@ -25,13 +25,30 @@ using std::any_cast; int main() { any a(1); - any_cast<int &>(&a); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} - any_cast<int &&>(&a); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} - any_cast<int const &>(&a); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} - any_cast<int const&&>(&a); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} + + // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} + any_cast<int &>(&a); // expected-note {{requested here}} + + // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} + any_cast<int &&>(&a); // expected-note {{requested here}} + + // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} + any_cast<int const &>(&a); // expected-note {{requested here}} + + // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} + any_cast<int const&&>(&a); // expected-note {{requested here}} + any const& a2 = a; - any_cast<int &>(&a2); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} - any_cast<int &&>(&a2); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} - any_cast<int const &>(&a2); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} - any_cast<int const &&>(&a2); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} + + // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} + any_cast<int &>(&a2); // expected-note {{requested here}} + + // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} + any_cast<int &&>(&a2); // expected-note {{requested here}} + + // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} + any_cast<int const &>(&a2); // expected-note {{requested here}} + + // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}} + any_cast<int const &&>(&a2); // expected-note {{requested here}} } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits