[all-commits] [llvm/llvm-project] fb3090: [UTC] Enable --function-signature by default

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Mar 7 01:28:08 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fb309041f0c37fa2798305ae02cf6910bf0b402b
      https://github.com/llvm/llvm-project/commit/fb309041f0c37fa2798305ae02cf6910bf0b402b
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-03-07 (Tue, 07 Mar 2023)

  Changed paths:
    M clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.funcsig.v2.expected
    A clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.v2.expected
    M clang/test/utils/update_cc_test_checks/mangled_names.test
    A llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/basic.ll.v2.expected
    M llvm/test/tools/UpdateTestChecks/update_test_checks/basic.test
    M llvm/utils/UpdateTestChecks/common.py

  Log Message:
  -----------
  [UTC] Enable --function-signature by default

This patch enables --function-signature by default under --version 2
and makes --version 2 the default. This means that all newly created
tests will check the function signature, while leaving old tests alone.

There's two motivations for this change:

* Without --function-signature, the generated check lines may fail
  in a very hard to understand way if the test both includes a
  function definition and a call to that function. (Though we could
  address this by making the CHECK-LABEL stricter, without checking
  the full signature.)
* This actually checks that uses of the arguments in the function
  body use the correct argument, instead of matching against any
  variable.

This is a replacement for D139006 and D140212 based on the
--version mechanism.

I did not include an opt-out flag --no-function-signature because
I'm not sure we need it. Would be happy to include it though,
if desired.

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




More information about the All-commits mailing list