[PATCH] D124287: [modules][ODRHash] Compare ODR hashes to detect mismatches in duplicate ObjCInterfaceDecl.

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 26 04:58:49 PDT 2022


jansvoboda11 added a comment.

This sounds reasonable to me. What use-cases does `ASTStructuralEquivalence` fit better than ODR hashes?



================
Comment at: clang/include/clang/Sema/Sema.h:3300
+            typename = std::enable_if_t<std::is_base_of<NamedDecl, T>::value>>
+  bool ActOnDuplicateDefinition(T *Duplicate, T *Previous) {
+    if (Duplicate->getODRHash() != Previous->getODRHash())
----------------
I'm not sure I'm a fan of using the exact same function name for checking ODR hashes and structural equivalence.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124287/new/

https://reviews.llvm.org/D124287



More information about the cfe-commits mailing list