diff options
| author | Phil Nash | 2019-05-20 23:56:55 +0100 |
|---|---|---|
| committer | Phil Nash | 2019-05-21 00:04:44 +0100 |
| commit | 71fce429afcebba7c32b6c46aced1013c6df9c0b (patch) | |
| tree | 86edf33144af0b2279f9b1e1d7aea242aa859c2c /projects/SelfTest/IntrospectiveTests/String.tests.cpp | |
| parent | d13e0945983e296388bb0f8293454206fdfd13b6 (diff) | |
| download | catch3-71fce429afcebba7c32b6c46aced1013c6df9c0b.tar.gz | |
Fix clang warning on self-assignment
Diffstat (limited to 'projects/SelfTest/IntrospectiveTests/String.tests.cpp')
| -rw-r--r-- | projects/SelfTest/IntrospectiveTests/String.tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/projects/SelfTest/IntrospectiveTests/String.tests.cpp b/projects/SelfTest/IntrospectiveTests/String.tests.cpp index 1a3bf6d2..8bf2ffb3 100644 --- a/projects/SelfTest/IntrospectiveTests/String.tests.cpp +++ b/projects/SelfTest/IntrospectiveTests/String.tests.cpp @@ -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); } } |