Incomplete statement: tweaked bailout for '0;' statement using isExpandedMacro()
This commit is contained in:
parent
7cfa54f0e0
commit
0c086cf247
|
@ -1734,7 +1734,7 @@ void CheckOther::checkIncompleteStatement()
|
|||
continue;
|
||||
|
||||
// No warning for [;{}] (void *) 0 ;
|
||||
if (Token::Match(tok, "[;{}] 0 ;") && tok->next()->isCast())
|
||||
if (Token::Match(tok, "[;{}] 0 ;") && (tok->next()->isCast() || tok->next()->isExpandedMacro()))
|
||||
continue;
|
||||
|
||||
// bailout if there is a "? :" in this statement
|
||||
|
|
|
@ -154,6 +154,9 @@ private:
|
|||
void void0() { // #6327
|
||||
check("void f() { (void*)0; }");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
check("void f() { $0; }");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void intarray() {
|
||||
|
|
Loading…
Reference in New Issue