[PATCH] D110452: [modules] Fix tracking ObjCInterfaceType decl when there are multiple definitions.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 24 16:08:01 PDT 2021


vsapsai added a comment.

This is a clean-up before https://reviews.llvm.org/D110453



================
Comment at: clang/lib/AST/DeclObjC.cpp:608
-  // Make the type point at the definition, now that we have one.
-  if (TypeForDecl)
-    cast<ObjCInterfaceType>(TypeForDecl)->Decl = this;
----------------
Tracking a type per decl is complementary to tracking decl per type and it looks potentially bug-prone. But I haven't noticed any problems with it and haven't tried to remove `TypeForDecl`. If anybody has any extra information on it, we can schedule subsequent fixes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110452



More information about the cfe-commits mailing list