[PATCH] D147194: [clang-tidy] fix concat-nest-namespace fix hint remove the macro
Congcong Cai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 30 16:51:02 PDT 2023
HerrCai0907 marked 3 inline comments as done.
HerrCai0907 added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:49
const LangOptions &LangOpts) {
// FIXME: This logic breaks when there is a comment with ':'s in the middle.
+ return getRawStringRef(ReplacementRange, Sources, LangOpts).count(':') ==
----------------
PiotrZSL wrote:
> check if you can do something with this...
>
> add test for:
>
> with something like:
> ```
> namespace x1 {
> // namespace x3::x4 {
> namespace x2 {
> void foo();
> }
> // }
> }
> ```
>
It still have false negative.
But this should be done in another PR. In here I just extract a common function without changing the logic.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147194/new/
https://reviews.llvm.org/D147194
More information about the cfe-commits
mailing list