vsapsai added inline comments.

================
Comment at: clang/lib/AST/DeclObjC.cpp:81-84
   lookup_result R = lookup(Id);
   for (lookup_iterator Ivar = R.begin(), IvarEnd = R.end();
        Ivar != IvarEnd; ++Ivar) {
+    if (auto *ivar = dyn_cast<ObjCIvarDecl>((*Ivar)->getCanonicalDecl()))
----------------
Don't really know what are the common patterns for name lookup and if this 
approach is acceptable. For C we call `LookupResult::resolveKind` to deal with 
multiple decls (and to avoid ambiguous lookup errors) but that's not available 
for `lookup_result` (aka `DeclContextLookupResult`).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110280

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

Reply via email to