Fixed false positive #4648
This commit is contained in:
parent
3ccdae78ba
commit
8722bba52a
|
@ -175,9 +175,9 @@ void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer, const char Fi
|
||||||
funcname = tok->next();
|
funcname = tok->next();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (Token::Match(tok, "[;{}.,()[=+-/|!?:] &| %var% [(),;:}]")) {
|
else if (Token::Match(tok, "[;{}.,()[=+-/|!?:] &| %var% [(),;]:}]")) {
|
||||||
funcname = tok->next();
|
funcname = tok->next();
|
||||||
if (tok->str() == "&")
|
if (funcname->str() == "&")
|
||||||
funcname = funcname->next();
|
funcname = funcname->next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ private:
|
||||||
TEST_CASE(attribute); // #3471 - FP __attribute__(constructor)
|
TEST_CASE(attribute); // #3471 - FP __attribute__(constructor)
|
||||||
TEST_CASE(initializer_list);
|
TEST_CASE(initializer_list);
|
||||||
TEST_CASE(member_function_ternary);
|
TEST_CASE(member_function_ternary);
|
||||||
|
TEST_CASE(boost);
|
||||||
|
|
||||||
TEST_CASE(multipleFiles); // same function name in multiple files
|
TEST_CASE(multipleFiles); // same function name in multiple files
|
||||||
|
|
||||||
|
@ -310,6 +311,12 @@ private:
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void boost() {
|
||||||
|
check("static void _xy(const char *b, const char *e)\n"
|
||||||
|
"{}\n"
|
||||||
|
"parse(line, blanks_p >> ident[&_xy] >> blanks_p >> eol_p).full");
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
}
|
||||||
|
|
||||||
void multipleFiles() {
|
void multipleFiles() {
|
||||||
CheckUnusedFunctions c;
|
CheckUnusedFunctions c;
|
||||||
|
|
Loading…
Reference in New Issue