[all-commits] [llvm/llvm-project] 50d7ec: [NFC][clang] Improve test coverage for alignment m...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Fri Sep 10 10:50:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 50d7ecc560b27d258c921abe39211926d46fbcff
      https://github.com/llvm/llvm-project/commit/50d7ecc560b27d258c921abe39211926d46fbcff
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-09-10 (Fri, 10 Sep 2021)

  Changed paths:
    M clang/test/CodeGen/alloc-fns-alignment.c

  Log Message:
  -----------
  [NFC][clang] Improve test coverage for alignment manifestation on aligned allocation functions


  Commit: 85ba583eba1902c386a55f5565f3c721bd6bcb23
      https://github.com/llvm/llvm-project/commit/85ba583eba1902c386a55f5565f3c721bd6bcb23
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-09-10 (Fri, 10 Sep 2021)

  Changed paths:
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/Sema/SemaDecl.cpp

  Log Message:
  -----------
  [NFCI][clang] Move allocation alignment manifestation for malloc-like into Sema from Codegen

... so that it happens right next to `AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction()`,
which is good for consistency.


  Commit: f3c2094d8c112f40923ef45953f66c4b2ecb6d01
      https://github.com/llvm/llvm-project/commit/f3c2094d8c112f40923ef45953f66c4b2ecb6d01
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-09-10 (Fri, 10 Sep 2021)

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/CodeGen/alloc-fns-alignment.c

  Log Message:
  -----------
  [clang] `aligned_alloc` allocation function specifies alignment in first arg, manifest that knowledge

Mainly, if a constant value was passed as an alignment,
then we correctly annotate the alignment of the returned value
of @aligned_alloc. And if it wasn't constant,
then we also don't loose that, but emit an assumption.


Compare: https://github.com/llvm/llvm-project/compare/da4a2fd832a5...f3c2094d8c11


More information about the All-commits mailing list