[PATCH] D51949: [clang-tidy] new check 'readability-isolate-declaration'
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 28 02:10:09 PDT 2018
lebedev.ri added a comment.
In https://reviews.llvm.org/D51949#1248861, @JonasToth wrote:
> In https://reviews.llvm.org/D51949#1248850, @lebedev.ri wrote:
>
> > I have looked through tests, and it is possible that i just missed it, but does it test/handle the cases like:
> >
> > struct S {
> > int X, Y, Z; // <- should be diagnosed.
> > }
> >
>
>
> Unfortunatly not :( The reason is, that `int X, Y, Z;` is not a `DeclStmt` but they are all `FieldDecl` (see https://godbolt.org/z/SXbQCa) which is why I excluded them for now.
> I did not look further into the issue, it could be easy to fix, but I don't know.
Negative tests are great to have too :)
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51949
More information about the cfe-commits
mailing list