Updated error message for stringLiteralWrite
This commit is contained in:
parent
9d31afb663
commit
666377da1c
|
@ -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");
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue