[PATCH] D121176: [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl.
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 8 19:43:50 PST 2022
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
More information about the cfe-commits
mailing list