commit
b20f44cf6a
|
@ -5244,7 +5244,11 @@ void Tokenizer::simplifyVarDecl(Token * tokBegin, Token * tokEnd, bool only_k_r_
|
|||
if (isstatic) {
|
||||
if (Token::Match(tok2->next(), "%num% ,"))
|
||||
tok2 = tok2->tokAt(2);
|
||||
else
|
||||
else if (Token::Match(tok2->next(), "( %num% ) ,")) { // ticket #4450
|
||||
tok2->deleteNext();
|
||||
tok2->next()->deleteNext();
|
||||
tok2 = tok2->tokAt(2);
|
||||
} else
|
||||
tok2 = NULL;
|
||||
} else if (isconst && !ispointer) {
|
||||
//do not split const non-pointer variables..
|
||||
|
|
|
@ -5581,6 +5581,13 @@ private:
|
|||
const char code[] = "static unsigned int *a=0, *b=0;";
|
||||
ASSERT_EQUALS("static unsigned int * a = 0 ; static unsigned int * b = 0 ;", tokenizeAndStringify(code));
|
||||
}
|
||||
|
||||
{
|
||||
const char code[] = "static int large_eeprom_type = (13 | (5)), "
|
||||
"default_flash_type = 42;";
|
||||
ASSERT_EQUALS("static int large_eeprom_type = 13 ; static int default_flash_type = 42 ;",
|
||||
tokenizeAndStringify(code));
|
||||
}
|
||||
}
|
||||
|
||||
void vardecl6() {
|
||||
|
|
Loading…
Reference in New Issue