[PATCH] D152335: [Clang] Add check to Sema::AddAlignedAttr to verify active bits is not out of range

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 12:15:21 PDT 2023


erichkeane added a comment.

In D152335#4404118 <https://reviews.llvm.org/D152335#4404118>, @aaron.ballman wrote:

> LGTM with a release note.
>
> In D152335#4404114 <https://reviews.llvm.org/D152335#4404114>, @erichkeane wrote:
>
>> Needs a release note.  Also, the changing of order is POSSIBLY a change in behavior (in that we're now diagnosing 'out of range' before 'power of 2'), but I don't think we care.
>
> I don't consider that a behavioral change to be worried about. Telling the user "this value is too big" before telling them "it's not a power of two" seems equivalent or perhaps slightly better than "this is not a power of two" and then "oh, and it's too big."

Well, its telling them "this value is too big" instead of "its not a power of two" rather than the other way around.  But yeah, i don't think I care?  I'm a little frightened there is no test that fails because of this, but not surprised.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152335/new/

https://reviews.llvm.org/D152335



More information about the cfe-commits mailing list