Fixed #4786 (segfault with one LibreOffice file)
This commit is contained in:
parent
3f5a858800
commit
4659745106
|
@ -7985,7 +7985,7 @@ void Tokenizer::simplifyComma()
|
|||
// Handle "delete a, a = 0;"
|
||||
tok->str(";");
|
||||
break;
|
||||
} else if (Token::Match(tok2, "[;,{}()]")) {
|
||||
} else if (Token::Match(tok2, "[:;,{}()]")) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2733,6 +2733,12 @@ private:
|
|||
"}\n";
|
||||
ASSERT_EQUALS("void f ( ) { char buf [ BUFSIZ ] ; char * * p ; char * ptrs [ BUFSIZ ] ; char * * pp ; }", tok(code));
|
||||
}
|
||||
|
||||
{
|
||||
// #4786 - don't replace , with ; in ".. : public B, C .." code
|
||||
const char code[] = "template < class T = X > class A : public B , C { } ;";
|
||||
ASSERT_EQUALS(code, tok(code));
|
||||
}
|
||||
}
|
||||
|
||||
void remove_comma() {
|
||||
|
|
Loading…
Reference in New Issue