Skip to content

Commit

Permalink
Format, comment
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jun 15, 2024
1 parent 502a35b commit 163d802
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/symboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1578,9 +1578,9 @@ namespace {
const Token* op2 = tok->astParent()->astOperand2();
if (op2 && op2->exprId() == 0 &&
!((tok->astParent()->astParent() && tok->astParent()->isAssignmentOp() && tok->astParent()->astParent()->isAssignmentOp()) ||
isLambdaCaptureList(op2) ||
(op2->str() == "(" && isLambdaCaptureList(op2->astOperand1())) ||
Token::simpleMatch(op2, "{ }")))
isLambdaCaptureList(op2) ||
(op2->str() == "(" && isLambdaCaptureList(op2->astOperand1())) ||
Token::simpleMatch(op2, "{ }")))
continue;

if (tok->astParent()->isExpandedMacro() || Token::Match(tok->astParent(), "++|--")) {
Expand Down
2 changes: 1 addition & 1 deletion lib/tokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4509,7 +4509,7 @@ void Tokenizer::setVarId()
if (tok->isName())
tok->varId(0);
// commas in init..
if (!Token::Match(tok, "%name%|= {"))
if (!Token::Match(tok, "%name%|= {")) // TODO: handle int a[]{1,2,3} ?
continue;
for (Token* tok2 = tok->tokAt(2); tok2 != tok->link(); tok2 = tok2->next()) {
if (tok2->link() && Token::Match(tok2, "[{[(<]"))
Expand Down

0 comments on commit 163d802

Please sign in to comment.