summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/any
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-04-13 05:27:55 +0000
committerEric Fiselier <eric@efcs.ca>2017-04-13 05:27:55 +0000
commit4365d4e951430a87ecd5e16e6d8e684bc55af001 (patch)
tree863dadb81bfdd5743ceafcce25bbb01e443c6697 /libcxx/test/std/utilities/any
parent7d3aaedc13c01178e5981015a77966625720a44b (diff)
downloadbcm5719-llvm-4365d4e951430a87ecd5e16e6d8e684bc55af001.tar.gz
bcm5719-llvm-4365d4e951430a87ecd5e16e6d8e684bc55af001.zip
Cleanup any_cast failure test
llvm-svn: 300175
Diffstat (limited to 'libcxx/test/std/utilities/any')
-rw-r--r--libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp33
1 files changed, 25 insertions, 8 deletions
diff --git a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
index 99cc029971a..bbc135051ef 100644
--- a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
+++ b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
@@ -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}}
}
OpenPOWER on IntegriCloud