[PATCH] D111543: [clang][modules] Stop creating `IdentifierInfo` for names of explicit modules
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 12 06:18:29 PDT 2021
jansvoboda11 added a comment.
In D111543#3056115 <https://reviews.llvm.org/D111543#3056115>, @dexonsmith wrote:
> Are you sure this is only for Objective-C interfaces? Doesn't also happen if you name a module after a C++ class or something, and reference it from an attribute?
>From my experiments, I don't think this is specific to Objective-C //interfaces//. I can reproduce this with:
// Interface.h
struct Interface;
// module-name-used-by-objc-bridge.m
void fn(struct Interface*);
// without this patch:
warning: declaration of 'struct Interface' will not be visible outside of this function
// with this patch: success, no diagnostics
However, this seems to be specific to `objc_bridge` and friends (`objc_bridge_mutable`, `objc_bridge_related`). I'm not super familiar with attributes, but these seem to be the only ones that can accept an undefined type identifier.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111543/new/
https://reviews.llvm.org/D111543
More information about the cfe-commits
mailing list