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 a57e265 commit b5343cb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/symboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3396,9 +3396,15 @@ 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 && Token::simpleMatch(eq->tokAt(-2), "= default ;")) {
func->isDefault(true);
return;
if (eq) {
if (Token::simpleMatch(eq->tokAt(-2), "= default ;")) {
func->isDefault(true);
return;
}
if (Token::simpleMatch(eq->tokAt(-2), "= delete ;")) {
func->isDelete(true);
return;
}
}
if (func->type == Function::eDestructor && destructor) {
func->hasBody(true);
Expand Down

0 comments on commit b5343cb

Please sign in to comment.