Skip to content

Commit c12f90e

Browse files
committed
[Clang] Always add deleted message to ODR hash
1 parent 800b643 commit c12f90e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

clang/lib/AST/ODRHash.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,9 @@ void ODRHash::AddFunctionDecl(const FunctionDecl *Function,
699699
StringLiteral *DeletedMessage = Function->getDeletedMessage();
700700
AddBoolean(DeletedMessage);
701701

702+
if (DeletedMessage)
703+
ID.AddString(DeletedMessage->getBytes());
704+
702705
AddDecl(Function);
703706

704707
AddQualType(Function->getReturnType());
@@ -712,11 +715,6 @@ void ODRHash::AddFunctionDecl(const FunctionDecl *Function,
712715
return;
713716
}
714717

715-
if (DeletedMessage) {
716-
ID.AddString(DeletedMessage->getBytes());
717-
return;
718-
}
719-
720718
const bool HasBody = Function->isThisDeclarationADefinition() &&
721719
!Function->isDefaulted() && !Function->isDeleted() &&
722720
!Function->isLateTemplateParsed();

0 commit comments

Comments
 (0)