Skip to content

Commit

Permalink
Update symboldatabase.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Feb 14, 2025
1 parent 0073052 commit 569de7e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/symboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3396,15 +3396,12 @@ void SymbolDatabase::addClassFunction(Scope *&scope, const Token *&tok, const To
const Token *closeParen = tok->linkAt(1);
if (closeParen) {
const Token *eq = TokenList::isFunctionHead(closeParen, ";");
if (eq) {
if (Token::simpleMatch(eq->tokAt(-2), "= default ;")) {
if (eq && Token::Match(eq->tokAt(-2), "= default|delete ;")) {
if (eq->strAt(-1) == "default")
func->isDefault(true);
return;
}
if (Token::simpleMatch(eq->tokAt(-2), "= delete ;")) {
else
func->isDelete(true);
return;
}
return;
}
if (func->type == Function::eDestructor && destructor) {
func->hasBody(true);
Expand Down

0 comments on commit 569de7e

Please sign in to comment.