On Nov 21, 2012, at 5:10 PM, Dmitri Gribenko <[email protected]> wrote:
> There are similar issues in 'nonnull', 'ownership' and 'format' > attributes. I have an incomplete patch for all these, that refactors > duplicated code over handle*() functions in SemaDeclAttr.cpp and fixes > this 128-bit issue, but I decided not to submit it until the semantic > analysis is fixed. Great, thanks. > I see that the code is much cleaner when FitsIn* are computed upfront, > but this leads to some extra work -- each isIntN() boils down to > counting leading zeros. Is there a clean way to defer the computation > to the point where it is required? I don't know how hot this code is, > so maybe this is not worth doing. In theory the compiler can do this optimization for us, at least in the common case of "small" literals (where I believe everything is in the APInt header). > This LGTM with tests and code style changes mentioned above, but > please wait for Richard Smith's review. Great, I'll add the tests you requested and fix the typos in the meantime. - Steve _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
