Skip to content

Commit b442173

Browse files
committed
[Clang] Include deleted message in ODR hash
1 parent 9df9e9f commit b442173

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang/lib/AST/ODRHash.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,9 @@ void ODRHash::AddFunctionDecl(const FunctionDecl *Function,
696696
AddBoolean(Function->isDeletedAsWritten());
697697
AddBoolean(Function->isExplicitlyDefaulted());
698698

699+
StringLiteral *DeletedMessage = Function->getDeletedMessage();
700+
AddBoolean(DeletedMessage);
701+
699702
AddDecl(Function);
700703

701704
AddQualType(Function->getReturnType());
@@ -709,6 +712,11 @@ void ODRHash::AddFunctionDecl(const FunctionDecl *Function,
709712
return;
710713
}
711714

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

0 commit comments

Comments
 (0)