[PATCH] D130324: [ODRHash] Hash `ObjCProtocolDecl` and diagnose discovered mismatches.
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 7 14:28:06 PDT 2022
jansvoboda11 added a comment.
Should we also update `ODRHash::isDeclToBeProcessed`?
================
Comment at: clang/lib/AST/ODRDiagsEmitter.cpp:313
+ DeclarationName SecondProtocolName = SecondProtocol->getDeclName();
+ if (FirstProtocolName != SecondProtocolName) {
+ SourceLocation FirstLoc = *(FirstProtocols.loc_begin() + I);
----------------
Are we okay with simply comparing protocol //names// here instead of the full declarations? I guess we're relying on the top-level diagnostic for those, and avoiding recursing, correct?
================
Comment at: clang/lib/AST/ODRDiagsEmitter.cpp:1660
+ case TypeDef:
+ case Var:
+ // C++ only, invalid in this context.
----------------
This will fall-through and call `llvm_unreachable`, will it not? I assume that's not intended.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130324/new/
https://reviews.llvm.org/D130324
More information about the cfe-commits
mailing list