[cfe-dev] __is_empty type trait patch

Sean Hunt rideau3 at gmail.com
Sun Aug 2 19:45:57 PDT 2009


Hello,

I'm a new coder hoping to help out with the C++ implementation on clang.
After fiddling around with several things I discovered were all being
worked on already, someone recommended I implement the __is_empty type
trait, so that is what I did. I was told to send a message here now;
I've attached a patch.

A few notes about this:

I put tests in test/SemaCXX/type-traits.cpp. There are a bunch of tests
I added to __is_pod and __is_empty, mainly for testing purposes. I was
going to remove them, but then I figured there's no sense removing tests
- more is better.

I also encountered, while doing checks for zero-width bit-fields, an
error "bit-field i has zero width". I added the word "named" to the
diagnostic so that it's clear what the error really is. This change is
unrelated but is minor so I included it anyways.

Sean Hunt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: __is_empty.patch
Type: text/x-diff
Size: 14657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090802/cd088e7d/attachment.patch>


More information about the cfe-dev mailing list