[PATCH] D144149: [Serialization] Don't warn when a deserialized category is equivalent to an existing one.
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 15 17:06:08 PST 2023
vsapsai created this revision.
vsapsai added reviewers: ChuanqiXu, jansvoboda11.
Herald added a subscriber: ributzka.
Herald added a project: All.
vsapsai requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
A single class allows multiple categories to be defined for it. But if
two of such categories have the same name, we emit a warning. It's not a
hard error but a good indication of a potential mistake.
With modules, we can end up with the same category in different modules.
Diagnosing such a situation has little value as the categories in
different modules are equivalent and don't reflect the usage of the same
name for different purposes. When we deserialize a duplicate category,
compare it to an existing one and warn only when the new one is
different.
rdar://104582081
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144149
Files:
clang/lib/Serialization/ASTReaderDecl.cpp
clang/test/Modules/compare-objc-interface.m
clang/test/Modules/hidden-duplicates.m
clang/test/Modules/objc-categories.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144149.497848.patch
Type: text/x-patch
Size: 5805 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230216/8357401f/attachment-0001.bin>
More information about the cfe-commits
mailing list