[cfe-dev] Determine whether the current clang version has a specific bug

Jordan Rose jordan_rose at apple.com
Tue Jun 26 18:03:23 PDT 2012

The __has_feature looks fine, but shouldn't you at least put an example in the test case?

+class HasFeatureTest {
+#if __has_feature(attribute_unused_on_fields)
+  int unused_; // expected-warning{{private field 'unused_' is not used}}
+  int unused2_ __attribute__((unused)); // no-warning

I know this is already covered by other tests, but it seems weird to test against a feature and then not use it.


On Jun 26, 2012, at 3:06 PM, Daniel Jasper wrote:

> Can someone please review this patch?
> Thank you!
> Daniel

More information about the cfe-dev mailing list