Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Apr 9, 2024
1 parent 3135907 commit d4dfe3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/astutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,11 @@ const Token* getParentLifetime(const Token* tok, const Library* library)
// If any of the submembers are borrowed types then stop
if (std::any_of(it.base() - 1, members.cend() - 1, [&](const Token* tok2) {
const Token* obj = tok2;
if(Token::simpleMatch(obj, "["))
if (Token::simpleMatch(obj, "["))
obj = tok2->astOperand1();
const Variable* var = obj->variable();
// Check for arrays first since astIsPointer will return true, but an array is not a borrowed type
if(var && var->isArray())
if (var && var->isArray())
return false;
if (astIsPointer(obj) || astIsContainerView(obj) || astIsIterator(obj))
return true;
Expand Down

0 comments on commit d4dfe3f

Please sign in to comment.