[all-commits] [llvm/llvm-project] c6207f: [clang-tidy] Fix c_str() removal and cast addition...

Piotr Zegar via All-commits all-commits at lists.llvm.org
Mon Aug 28 12:44:48 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c6207f6e0d04f129b4ec2ada644c0224038f4705
      https://github.com/llvm/llvm-project/commit/c6207f6e0d04f129b4ec2ada644c0224038f4705
  Author: Mike Crowe <mac at mcrowe.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp
    M clang-tools-extra/clang-tidy/utils/FormatStringConverter.h
    M clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print.cpp

  Log Message:
  -----------
  [clang-tidy] Fix c_str() removal and cast addition when re-ordering arguments

The modernize-use-std-print check would get confused if it had to
re-order field-width and precision arguments at the same time as adding
casts or removing calls to c_str().

Fix this by tracking the argument indices and combining c_str() removal
with argument re-ordering. Add missing test cases to lit check.

Fixes https://github.com/llvm/llvm-project/issues/64033

Reviewed By: PiotrZSL

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


  Commit: 6e2d94a40d17832a04de7bb5294388fbf7f95991
      https://github.com/llvm/llvm-project/commit/6e2d94a40d17832a04de7bb5294388fbf7f95991
  Author: Piotr Zegar <me at piotrzegar.pl>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M clang-tools-extra/docs/ReleaseNotes.rst

  Log Message:
  -----------
  [clang-tidy][NFC] Relase notes for modernize-use-std-print

Update release notes for modernize-use-std-print check.
Post D156616 action.


Compare: https://github.com/llvm/llvm-project/compare/9c760ca8ecfd...6e2d94a40d17


More information about the All-commits mailing list