[cfe-dev] Small Patch and VS2005 enum pb

Cédric Venet cedric.venet at student.ecp.fr
Sat Dec 1 13:15:52 PST 2007

> > - a missing file ASTConsumer.cpp in clangAST projet for VS
> This part conflicted when I applied it.  Please ensure it is relative
> to an updated tree.

Strange, my tree was up to date (I just updated and there was no change on
this file).
It was perhaps caused by the version number which changed from 8.0 to 8,0
following my system local... I removed this modification from this patch, it
will perhaps work now...

> > More specifically, the problem is in DeclSpec.h at the line 64 and
> Ok.

In fact, all the enum of the class are affected, so I patched them all (hope
there isn't more hiding somewhere)

> I think the best way to solve this is to change the definition of
> TypeSpecType to:
> unsigned TypeSpecType : 4;  // really should be TST, marking this
> 'unsigned' for MSVC++

I put /*TST*/unsigned TypeSpecType : 4;

Forgot the commentary, sorry, can redo if needed

> And then make the accessor do:
> TST getTypeSpecType() const { return (TST)TypeSpecType; }

I also had to add some cast in the associate cpp file.

> Sound good?
> -Chris

A fast testing show it work. (or at least some bug are corrected)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsignedEnumVS.patch
Type: application/octet-stream
Size: 5898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20071201/d539cba5/attachment.obj>

More information about the cfe-dev mailing list