carlosgalvezp accepted this revision. carlosgalvezp added a comment. This revision is now accepted and ready to land.
Looks great, thanks! ================ Comment at: clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp:86 + Result.Nodes.getNodeAs<LinkageSpecDecl>("extern"); + Extern && !Extern->hasBraces()) + BeginLoc = Extern->getExternLoc(); ---------------- PiotrZSL wrote: > carlosgalvezp wrote: > > This can be removed, leaving it as: > > > > ``` > > if (const auto *Extern = ... && !Extern->hasBraces()) > > ``` > If you mean: > ``` > if (const auto *Extern = > Result.Nodes.getNodeAs<LinkageSpecDecl>("extern"); > !Extern->hasBraces()) > ```` > > then no, it cannot be like this because Extern can be null. You are right, this can only be done when there's no other conditions in the `if`! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146904/new/ https://reviews.llvm.org/D146904 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits