[PATCH] D91659: Allow enum typedefs to be referenced with the 'enum' specifier under MSVC compat mode
Shivanshu Goyal via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 1 15:58:14 PST 2020
shivanshu3 added inline comments.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:15752-15754
+ bool AnonymousEnumEligible = getLangOpts().MSVCCompat &&
+ (Kind == TTK_Enum) &&
+ Tag->getDeclName().isEmpty();
----------------
shivanshu3 wrote:
> rsmith wrote:
> > In the anonymous union case, we also need to check for qualifiers on the typedef type, and more broadly perhaps we should be using `getAnonDeclWithTypedefName` here too. Presumably the new case should also only apply for `TUK_Reference`.
> I added a check for TUK_Reference. But I don't fully understand your other comment about checking the qualifiers on the typedef type. Could you please explain a little more?
@rsmith Since my newest iteration removes the restriction for the enum to be anonymous, I'm guessing I can mark this comment as resolved?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91659/new/
https://reviews.llvm.org/D91659
More information about the cfe-commits
mailing list