vsapsai added a comment.

Recollected that `ASTStructuralEquivalence` by default tends to be 
order-dependent while ODR hash order-independent. Different approaches can be 
achieved with different mechanisms but some behavior is easier to achieve.

Another peculiarity of `ASTStructuralEquivalence` is that it allows more 
customizability. Initializing `StructuralEquivalenceContext` is more involved 
than `getODRHash()` but adding knobs for tweaking comparison behavior is easier.



================
Comment at: clang/lib/AST/ODRHash.cpp:528
+
+  //FIXME: Hash other interface-specific elements like protocols, etc.
+
----------------
jansvoboda11 wrote:
> Is this important to implement now, or are you fine leaving this be for the 
> time being?
When I was posting this patch, I thought it wasn't critical to cover everything 
immediately. Now I'm thinking about the ways to minimize the uncovered 
elements. Specifically, I'm thinking about adding support for protocols first 
and then for interfaces. Protocols aren't as useful as interfaces but they are 
simpler and can be easier to add.

And `AddSubDecl` should cover some of the nested decls already, need to add 
more cases to the test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124287

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

Reply via email to