[PATCH] D151523: [ASTStructuralEquivalence] Fix crash when ObjCCategoryDecl doesn't have corresponding ObjCInterfaceDecl.

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 30 13:14:12 PDT 2023


shafik added inline comments.


================
Comment at: clang/lib/AST/ASTStructuralEquivalence.cpp:2062
+                          *Intf2 = D2->getClassInterface();
+  if ((Intf1 != nullptr) != (Intf2 != nullptr))
+    return false;
----------------
I think this would be easier to read if you checked `Intf1 != Intf2` and then checked for `nullptr`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151523



More information about the cfe-commits mailing list