Merge remote branch 'remotes/origin/master'
This commit is contained in:
commit
6c582f9362
|
@ -1794,7 +1794,9 @@ bool CheckBufferOverrun::ArrayInfo::declare(const Token *tok, const Tokenizer &t
|
|||
if (!tok->isName())
|
||||
return false;
|
||||
|
||||
while (tok && (tok->str() == "static" || tok->str() == "const"))
|
||||
while (tok && (tok->str() == "static" ||
|
||||
tok->str() == "const" ||
|
||||
tok->str() == "extern"))
|
||||
tok = tok->next();
|
||||
|
||||
int ivar = 0;
|
||||
|
|
|
@ -1700,6 +1700,13 @@ private:
|
|||
" strcpy(x, \"12\");\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
check("extern char a[10];\n"
|
||||
"void f() {\n"
|
||||
" char b[25] = {0};\n"
|
||||
" std::memcpy(b, a, sizeof(a));\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void sprintf1()
|
||||
|
|
Loading…
Reference in New Issue