vsapsai added inline comments.

================
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:832
+      RD->setCompleteDefinition(false);
+      Reader.mergeDefinitionVisibility(OldDef, RD);
+    } else {
----------------
Here is the perfect place to compare if `RD` and `OldDef` are equivalent and 
emit diagnostic if they are not. I've tried `StructuralEquivalenceContext` for 
this purpose but it compares canonical decls which doesn't work in this case. I 
think the best approach for this task would be ODR hash comparison proposed in 
https://reviews.llvm.org/D71734 It will need some tweaks to work with the 
current patch but overall the plan is to use ODR hash instead of any other decl 
comparison.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106994

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to