[PATCH] D51192: Fix reported range of partial token replacement

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 6 12:46:46 PDT 2018


aaron.ballman added a comment.

In https://reviews.llvm.org/D51192#1226312, @steveire wrote:

> In https://reviews.llvm.org/D51192#1226282, @aaron.ballman wrote:
>
> > I'd probably pipe the diagnostic output to a temporary file that gets FileChecked with strict whitespace to see if the underlines from the diagnostic match the expected locations. We do this in a few Clang tests, like SemaCXX\struct-class-redecl.cpp or Misc\wrong-encoding.c.
>
>
> Doesn't this require building-in a new check to clang-tidy which exists only for the purpose of the test? Otherwise how would a test similar to `SemaCXX\struct-class-redecl.cpp` work? What would be in the `RUN` line?


Oh, I had the impression that this was changing the behavior of existing checks in the tree as well, and that we'd have an existing clang-tidy check that exhibits the problematic behavior. Is that not the case?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51192





More information about the cfe-commits mailing list