[all-commits] [llvm/llvm-project] 107189: [TableGen] Report an error message on a missing comma

Alexander Richardson via All-commits all-commits at lists.llvm.org
Fri Apr 9 10:50:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 107189a26eef0e6aef19b1bad4a3349d6207ac32
      https://github.com/llvm/llvm-project/commit/107189a26eef0e6aef19b1bad4a3349d6207ac32
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2021-04-09 (Fri, 09 Apr 2021)

  Changed paths:
    M llvm/lib/TableGen/TGParser.cpp
    M llvm/test/TableGen/template-args.td

  Log Message:
  -----------
  [TableGen] Report an error message on a missing comma

I recently forgot a comma in a defm argument list and tablegen just
failed with exit code 1 without printing an error message. I believe
this issue was introduced in a9fc44c5573208859c2550382755098d750fc47d.

This change prints the following instead:
.../clang/include/clang/Driver/Options.td:569:3: error: Expected comma before next argument

Reviewed By: Paul-C-Anagnostopoulos

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


  Commit: ed0bf875a93e184c234510717b22fb4c8367ed82
      https://github.com/llvm/llvm-project/commit/ed0bf875a93e184c234510717b22fb4c8367ed82
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2021-04-09 (Fri, 09 Apr 2021)

  Changed paths:
    M compiler-rt/lib/builtins/aarch64/fp_mode.c
    M compiler-rt/lib/builtins/arm/fp_mode.c
    M compiler-rt/lib/builtins/fp_add_impl.inc
    M compiler-rt/lib/builtins/fp_mode.c
    M compiler-rt/lib/builtins/fp_mode.h
    M compiler-rt/lib/builtins/i386/fp_mode.c

  Log Message:
  -----------
  [builtins] Avoid enum name conflicts with fenv.h

After a follow-up change (D98332) this header can be included the same time
as fenv.h when running the tests. To avoid enum members conflicting with
the macros/enums defined in the host fenv.h, prefix them with CRT_.

Reviewed By: peter.smith

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


  Commit: dc4abca7662b74467c2b6bceb7e8b046ae04b8a0
      https://github.com/llvm/llvm-project/commit/dc4abca7662b74467c2b6bceb7e8b046ae04b8a0
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2021-04-09 (Fri, 09 Apr 2021)

  Changed paths:
    M clang/include/clang/Basic/Attr.td
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    A clang/test/CodeGen/alloc-size-fnptr.c
    M clang/test/CodeGen/alloc-size.c
    M clang/test/Misc/pragma-attribute-supported-attributes-list.test
    M clang/test/Sema/alloc-size.c

  Log Message:
  -----------
  Handle alloc_size attribute on function pointers

I have been trying to statically find and analyze all calls to heap
allocation functions to determine how many of them use sizes known at
compile time vs only at runtime. While doing so I saw that quite a few
projects use replaceable function pointers for heap allocation and noticed
that clang was not able to annotate functions pointers with alloc_size.
I have changed the Sema checks to allow alloc_size on all function pointers
and typedefs for function pointers now and added checks that these
attributes are propagated to the LLVM IR correctly.

With this patch we can also compute __builtin_object_size() for calls to
allocation function pointers with the alloc_size attribute.

Reviewed By: aaron.ballman, erik.pilkington
Differential Revision: https://reviews.llvm.org/D55212


Compare: https://github.com/llvm/llvm-project/compare/40e75cafc0fe...dc4abca7662b


More information about the All-commits mailing list