[PATCH] D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 7 17:35:36 PST 2022


vsapsai added a comment.

The main alternative to the current implementation was to change `getRedeclContext` for ObjCCategoryDecl, so we handle ivar redeclarations and merges in ObjCInterfaceDecl with `ASTDeclReader::findExisting`. Decided against it because of noticeably different merging behavior:

- should merge not any same-name ivars but only those located in equivalent extensions;
- should error for incompatible same-name ivars;
- should handle ObjCCategoryDecl too but we should check them not during their deserialization but after their ivars are deserialized.

Mostly for these reasons decided not to piggy-back on `ASTDeclReader::findExisting` but to have a different implementation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121177



More information about the cfe-commits mailing list