vsapsai added inline comments.

================
Comment at: clang/lib/AST/ASTStructuralEquivalence.cpp:1240
-                                     FieldDecl *Field1, FieldDecl *Field2) {
-  const auto *Owner2 = cast<RecordDecl>(Field2->getDeclContext());
 
----------------
By the way, the alternative to introducing parameter `Owner2Type` was to use 
`...Owner2 = cast<TypeDecl>(...)`. But that would work only for 
ObjCInterfaceDecl and would require making ObjCInterfaceDecl TypeDecl. 
Conceptually, it makes sense for ObjCInterfaceDecl to be TypeDecl as 
`@interface` does represent a type. But I've decided that such invasive change 
is not justified.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121176

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

Reply via email to