Skip to content

Commit

Permalink
re-worded some (verbose) error messages [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Jan 14, 2025
1 parent a615a28 commit dff56a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions lib/checkexceptionsafety.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/checkfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit dff56a0

Please sign in to comment.