This commit is contained in:
parent
103ff907b6
commit
d1e1f951df
|
@ -7176,7 +7176,7 @@ bool Tokenizer::isScopeNoReturn(const Token *endScopeToken, bool *unknown) const
|
|||
bool warn = true;
|
||||
if (Token::simpleMatch(endScopeToken->tokAt(-2), ") ; }")) {
|
||||
const Token * const ftok = endScopeToken->linkAt(-2)->previous();
|
||||
if (ftok && (ftok->type() || (ftok->function() && ftok->function()->hasBody()))) // constructor call
|
||||
if (ftok && (ftok->type() || ftok->function())) // constructor call
|
||||
warn = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -2402,6 +2402,12 @@ private:
|
|||
ASSERT_EQUALS("[test.c:3]: (information) --check-library: Function x() should have <noreturn> configuration\n"
|
||||
"[test.c:4]: (information) --check-library: Function x() should have <use>/<leak-ignore> configuration\n",
|
||||
errout.str());
|
||||
|
||||
check("void cb();\n" // #11190, #11523
|
||||
"void f() {\n"
|
||||
" cb();\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void configuration2() {
|
||||
|
|
Loading…
Reference in New Issue