[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

Matthias Gehre via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 30 14:32:58 PDT 2020


mgehre added a comment.

This change breaks `modernize-use-using` fixits.
The code
`typedef int A, B;`
is replaced into

  using A = int;
  using B = int;

when directly applying fixits with clang-tidy. But it is replaced into

  using A = int;
  
  using B = int;

when applying fixits with `clang-apply-replacements`. 
This is because the check creates two replacements,
the first one being `typedef int A` -> `using A = int`
and the second one being `, B` -> `;\nusing B = int`.

With this change, the newline is duplicated, which introduces an unwanted newline.
Any advice how to fix this properly?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63482/new/

https://reviews.llvm.org/D63482





More information about the cfe-commits mailing list