On Oct 5, 2010, at 4:24 PM, Fariborz Jahanian wrote: > Author: fjahanian > Date: Tue Oct 5 18:24:00 2010 > New Revision: 115713 > > URL: http://llvm.org/viewvc/llvm-project?rev=115713&view=rev > Log: > Issue deprecated warning when typeof uses an > expression of deprecated type.
This seems strange to me; deprecation warnings are usually based on how something is spelled, not what it actually resolves to. For example, even if a record type is deprecated, you can still make variables of that type if you have a non-deprecated typedef for it. So if the variable itself isn't deprecated, I'm not sure why getting its type with typeof is more suspect than any other use. Is there a specific use case motivating this? There are a lot of subsidiary questions here, like whether we should warn in the following test cases: deprecated_type *a; typeof(*a) b; // we now warn about this deprecated_type *a; typeof(a) b; // but not about this deprecated_typedef a; typeof(a) b; // or this etc. Also, you can just use getAs<TagType>() instead of testing for RecordType and EnumType separately. John. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
