[PATCH] D74103: Implement P1766R1: diagnose giving non-C-compatible classes a typedef name for linkage purposes.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 6 17:38:27 PST 2020


rjmccall added a comment.

Okay, if the basic idea is to avoid anything that would need the linkage to be computed, that seems like exactly the right goal.

I know one of the awful ways to get an early reference to the anonymous type is to define a typedef of like a pointer to it, then use that in a second declarator, then try to give it a typedef-for-linkage-purposes in yet another declarator.   I don't know of any way to get an expression whose type involves the anonymous type without a non-static member function or initializer or something like that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74103





More information about the cfe-commits mailing list