Merge remote branch 'remotes/origin/master'

This commit is contained in:
Kimmo Varis 2010-10-13 22:16:17 +03:00
commit 6c582f9362
2 changed files with 10 additions and 1 deletions

View File

@ -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;

View File

@ -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()