diff --git a/lib/checkexceptionsafety.cpp b/lib/checkexceptionsafety.cpp index a0c0a58d7d0a..10626791facb 100644 --- a/lib/checkexceptionsafety.cpp +++ b/lib/checkexceptionsafety.cpp @@ -404,9 +404,8 @@ void CheckExceptionSafety::rethrowNoCurrentException() void CheckExceptionSafety::rethrowNoCurrentExceptionError(const Token *tok) { reportError(tok, Severity::error, "rethrowNoCurrentException", - "Rethrowing current exception with 'throw;', it seems there is no current exception to rethrow." - " If there is no current exception this calls std::terminate()." - " More: https://isocpp.org/wiki/faq/exceptions#throw-without-an-object", + "No current exception to rethrow. Will result in std::terminate() call.\n" + "More: https://isocpp.org/wiki/faq/exceptions#throw-without-an-object", CWE480, Certainty::normal); } diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index 49abcc505958..34fe776eb7d0 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -719,8 +719,8 @@ void CheckFunctions::copyElisionError(const Token *tok) reportError(tok, Severity::performance, "returnStdMoveLocal", - "Using std::move for returning object by-value from function will affect copy elision optimization." - " More: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-return-move-local"); + "Using std::move for returning object by-value from function will affect copy elision optimization.\n" + "More: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-return-move-local"); } void CheckFunctions::useStandardLibrary()