diff options
Diffstat (limited to 'test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp')
| -rw-r--r-- | test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp b/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp index a35dfd696259..c18822bbe811 100644 --- a/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp +++ b/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp @@ -30,4 +30,11 @@ int main() { // bind rvalue to constructed non-rvalue std::tuple<std::string &&> t2("hello"); // expected-note {{requested here}} std::tuple<std::string &&> t3(std::allocator_arg, alloc, "hello"); // expected-note {{requested here}} + + // FIXME: The below warnings may get emitted as an error, a warning, or not emitted at all + // depending on the flags used to compile this test. + { + // expected-warning@tuple:* 0+ {{binding reference member 'value' to a temporary value}} + // expected-error@tuple:* 0+ {{binding reference member 'value' to a temporary value}} + } } |
