forked from OSchip/llvm-project
Revert "[CStringSyntaxChecker] Reduces space around error message for strlcat."
This reverts commit 6b43b80320722da41ca6ef7a3b57cc300fb83094. llvm-svn: 340500
This commit is contained in:
parent
bc3089f45f
commit
b45bf3bb8b
|
@ -273,7 +273,7 @@ void WalkAST::VisitCallExpr(CallExpr *CE) {
|
|||
if (!LenName.empty())
|
||||
os << "'" << LenName << "'";
|
||||
else
|
||||
os << "<size>";
|
||||
os << " <size> ";
|
||||
if (!DstName.empty())
|
||||
os << " - strlen(" << DstName << ")";
|
||||
else
|
||||
|
|
|
@ -42,7 +42,7 @@ void testStrlcat(const char *src) {
|
|||
strlcpy(dest, "aaaaa", sizeof("aaaaa") - 1);
|
||||
strlcat(dest, "bbbb", (sizeof("bbbb") - 1) - sizeof(dest) - 1);
|
||||
strlcpy(dest, "012345678", sizeof(dest));
|
||||
strlcat(dest, "910", sizeof(dest)); // expected-warning {{The third argument allows to potentially copy more bytes than it should. Replace with the value <size> - strlen(dest) - 1 or lower}}
|
||||
strlcat(dest, "910", sizeof(dest)); // expected-warning {{The third argument allows to potentially copy more bytes than it should. Replace with the value <size> - strlen(dest) - 1 or lower}}
|
||||
strlcpy(dest, "0123456789", sizeof(dest));
|
||||
strlcat(dest, "0123456789", badlen); // expected-warning {{The third argument allows to potentially copy more bytes than it should. Replace with the value 'badlen' - strlen(dest) - 1 or lower}}
|
||||
strlcat(dest, "0123456789", badlen - strlen(dest) - 1);
|
||||
|
|
Loading…
Reference in New Issue