Fix clang warning on self-assignment

This commit is contained in:
Phil Nash 2019-05-20 23:56:55 +01:00
parent d13e094598
commit 71fce429af
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ TEST_CASE( "StringRef", "[Strings][StringRef]" ) {
REQUIRE( ss.currentData() != s.currentData() ); // different pointer value
SECTION( "Self-assignment after substring" ) {
ss = ss;
ss = *&ss; // the *& are there to suppress warnings (see: "Improvements to Clang's diagnostics" in https://rev.ng/gitlab/revng-bar-2019/clang/raw/master/docs/ReleaseNotes.rst)
REQUIRE(isOwned(ss) == true);
}
}