[cfe-dev] forward declare enums

Yingshen Yu yingshen.yu at gmail.com
Mon Jul 1 02:37:38 PDT 2013


Hi,

I'm working on an old codebase, it uses some (if not a lot) enum forward
declarations like below.

struct MyStruct;
enum MyStruct::MyEnum;

the enum definition is like

struct MyStruct {
    enum MyEnum { .... };
};

The enum forward declaration seems working with the XCode4 and XCode5-DP,
but it is reported as error when building with a trunk build of open source
LLVM.

So should I understand Apple's Clang is more tolerate than the open sourced
Clang? or It just because such checks are added recently and not available
in Xcode 5?

Thanks,
-- 
Yingshen(Jonny) Yu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130701/037115f9/attachment.html>


More information about the cfe-dev mailing list