[PATCH] D69238: Fix clang-tidy readability-redundant-string-init for c++17/c++2a
Conrad Poelman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 28 10:14:31 PDT 2019
poelmanc marked 5 inline comments as done.
poelmanc added a comment.
Thanks for the feedback, the new patch removes the extra `const`, `clang::`, and braces on one-line `if` statements, and now explains the regex in readability-redundant-string-init.cpp.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-redundant-string-init.cpp:106
DECL_STRING(e, "");
- // CHECK-MESSAGES: [[@LINE-1]]:15: warning: redundant string initialization
+ // CHECK-MESSAGES: [[@LINE-1]]:1{{[58]}}: warning: redundant string initialization
----------------
aaron.ballman wrote:
> Why does this need a regex?
Thanks, I added a comment explaining that the character position of the warning differs slightly between C++11/14 (reports at the 'e') and C++17/2x (reports at the '"'), since the underlying parsing code has changed.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69238/new/
https://reviews.llvm.org/D69238
More information about the cfe-commits
mailing list