TagDecl::isFreeStanding vs. TagDecl::isEmbeddedInDeclarator

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

TagDecl::isFreeStanding vs. TagDecl::isEmbeddedInDeclarator

Jon Chesterfield via cfe-dev
Hi, all. I'm looking at distinguishing the following two enum declarations for Swift reasons:

enum {
  Constant1,
  Constant2
};

enum {
  ConstantA,
  ConstantB
} someGlobalSetting;

It looks like Clang makes this possible, which is nice! However, it looks like it's possible via two different mechanisms, which is confusing. TagDecl::isFreeStanding seems to track whether the tag declarations was parsed as part of a declarator, while TagDecl::isEmbeddedInDeclarator tracks whether a part of a declarator turned out to be a tag declaration. But those seem to be equivalent properties to me. Am I missing something here?

Thanks,
Jordan

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev