[all-commits] [llvm/llvm-project] 0b3d73: Check if First argument in _builtin_assume_aligned...

Rishabh Bali via All-commits all-commits at lists.llvm.org
Fri May 5 10:12:53 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0b3d737877040a4eae03e47223f9a9ddfd7bd182
  Author: Rishabh Bali <rishabhsbali at gmail.com>
  Date:   2023-05-05 (Fri, 05 May 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/Sema/builtin-assume-aligned.c

  Log Message:
  Check if First argument in _builtin_assume_aligned_ is of pointer type

Currently clang doesn't verify if the first argument in
`_builtin_assume_aligned` is of pointer type. This leads to an
assertion build failure. This patch aims to add a check if the first
argument is of pointer type or not and diagnose it with
diag::err_typecheck_convert_incompatible if its not of pointer type.

Fixes https://github.com/llvm/llvm-project/issues/62305
Differential Revision: https://reviews.llvm.org/D149514

More information about the All-commits mailing list