[all-commits] [llvm/llvm-project] 086183: [Clang] Add check to Sema::AddAlignedAttr to verif...

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Thu Jun 8 13:54:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 086183c6c65fc8106b8cae99af95c4974b975f51
      https://github.com/llvm/llvm-project/commit/086183c6c65fc8106b8cae99af95c4974b975f51
  Author: Shafik Yaghmour <shafik.yaghmour at intel.com>
  Date:   2023-06-08 (Thu, 08 Jun 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/test/Sema/attr-aligned.c

  Log Message:
  -----------
  [Clang] Add check to Sema::AddAlignedAttr to verify active bits is not out of range

If we provide too large a value for the alignment attribute
APInt::getZExtValue() will assert. This PR adjusts existing check to catch
this case and provide a diagnostic.

This fixes: https://github.com/llvm/llvm-project/issues/50534

Differential Revision: https://reviews.llvm.org/D152335




More information about the All-commits mailing list