summaryrefslogtreecommitdiffstats
path: root/sal/qa/rtl/strings/test_ostring_concat.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sal/qa/rtl/strings/test_ostring_concat.cxx')
-rw-r--r--sal/qa/rtl/strings/test_ostring_concat.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx b/sal/qa/rtl/strings/test_ostring_concat.cxx
index b2adc17272d6..80fa62df6be5 100644
--- a/sal/qa/rtl/strings/test_ostring_concat.cxx
+++ b/sal/qa/rtl/strings/test_ostring_concat.cxx
@@ -147,6 +147,13 @@ void test::ostring::StringConcat::checkInvalid()
rtl_uString* rus = nullptr;
CPPUNIT_ASSERT( INVALID_CONCAT( OUString( "b" ) + rs ));
CPPUNIT_ASSERT( INVALID_CONCAT( OUString( "b" ) + rus ));
+
+#if 0
+ // Should fail to compile, to avoid use of OStringConcat lvalues that
+ // contain dangling references to temporaries:
+ auto const conc = OStringLiteral("foo") + "bar";
+ (void) OString(conc);
+#endif
}
}} // namespace