[PATCH] D64480: [ASTImporter] Added visibility context check for TypedefNameDecl.

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 14:29:46 PDT 2019


shafik added a comment.

In D64480#1654354 <https://reviews.llvm.org/D64480#1654354>, @balazske wrote:

> In D64480#1653629 <https://reviews.llvm.org/D64480#1653629>, @shafik wrote:
>
> > It is worth noting that:
> >
> >   typedef int T;
> >   typedef int T;
> >
> >
> > is not valid C99 see godbolt <https://godbolt.org/z/638lXv>
>
>
> Should we handle this case? This can be special for C99 only when the declarations must be merged instead of linked. Probably this does not cause functional problems if we leave it as is.


I don't think it is critical to handle this case but I was surprised when I learned this, it is an edge case and it would be good to note this perhaps as a comment in the code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64480





More information about the cfe-commits mailing list