bricci added a comment.

The static_assert itself cannot be in the bitfield since the whole point is to 
avoid including Basic/IdentifierTable.h just for this.

I originally put the static_assert in ObjCMethodDecl and everything worked fine 
when tested with GCC but I then saw just
after you committed it that it broke some builds. Therefore for the moment I 
just removed it (and had to beg someone on IRC to commit it )

However  I think that we can simply add it to the definition of the class 
ObjCMethodDecl with a comment both in the bitfield
and in ObjCMethodDecl which explains why we checks this. The problem was not 
the location of the static_assert, but the fact that
even though the member ObjCMethodDeclBits is protected the nested class 
ObjCMethodDeclBitfields is private. However I think tha
we can just use something like

`static_assert(decltype(ObjCMethodDeclBits)::ObjCMethodFamilyBitWidth == 
ObjCMethodFamilyBitWidth, "blablabla")`


Repository:
  rC Clang

https://reviews.llvm.org/D50163



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to