Updated error message for stringLiteralWrite

This commit is contained in:
Daniel Marjamäki 2015-05-03 10:48:28 +02:00
parent 9d31afb663
commit 666377da1c
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ void CheckString::stringLiteralWrite()
void CheckString::stringLiteralWriteError(const Token *tok)
{
reportError(tok, Severity::error, "stringLiteralWrite",
"Modifying string literal directly or indirectly is UB");
"Modifying string literal directly or indirectly is undefined behaviour");
}
//---------------------------------------------------------------------------

View File

@ -102,13 +102,13 @@ private:
" char *abc = \"abc\";\n"
" abc[0] = 'a';\n"
"}");
ASSERT_EQUALS("[test.cpp:3]: (error) Modifying string literal directly or indirectly is UB\n", errout.str());
ASSERT_EQUALS("[test.cpp:3]: (error) Modifying string literal directly or indirectly is undefined behaviour\n", errout.str());
check("void f() {\n"
" char *abc = \"abc\";\n"
" *abc = 'a';\n"
"}");
ASSERT_EQUALS("[test.cpp:3]: (error) Modifying string literal directly or indirectly is UB\n", errout.str());
ASSERT_EQUALS("[test.cpp:3]: (error) Modifying string literal directly or indirectly is undefined behaviour\n", errout.str());
check("void f() {\n"
" char *abc = \"abc\";\n"