[PATCH] D112646: [clang-tidy] Add `readability-container-contains` check
Whisperity via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 16 02:44:05 PST 2021
whisperity added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/readability/ContainerContainsCheck.cpp:105-108
+ const auto *PositiveCheck = Result.Nodes.getNodeAs<Expr>("positive");
+ const auto *NegativeCheck = Result.Nodes.getNodeAs<Expr>("negative");
+ bool Negated = NegativeCheck != nullptr;
+ const auto *Check = Negated ? NegativeCheck : PositiveCheck;
----------------
`Comparison` instead of `Check`? These should be matching the `binaryOperator`, right?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112646/new/
https://reviews.llvm.org/D112646
More information about the cfe-commits
mailing list