[PATCH] D147875: [clang][Diagnostics] Show line numbers when printing code snippets
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 27 00:10:51 PDT 2023
tbaeder added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/cert/uppercase-literal-suffix-integer.cpp:34
// CHECK-MESSAGES-NEXT: ^~
- // CHECK-MESSAGES-NEXT: {{^ *}}L{{$}}
+ // CHECK-MESSAGES-NEXT: {{^ *| *}}L{{$}}
// CHECK-FIXES: static constexpr auto v5 = 1L;
----------------
PiotrZSL wrote:
> In theory you should escape this character (`|`) by using `\`, otherwise it could be interpreted as an regexp or. Still looks like this test file passes, so 7 to go.
Yeah I noticed the missing backslash but the test passed.
For the other tests, I've just removed the `{{^ *}}` before the uppercase suffix. It seems pointless to check that the line contains nothing else(?). I can revert that of course, but it seemed like the easier fix.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147875/new/
https://reviews.llvm.org/D147875
More information about the cfe-commits
mailing list