================
@@ -141,6 +154,48 @@ void UseStdBitCheck::check(const MatchFinder::MatchResult
&Result) {
<< IncludeInserter.createIncludeInsertion(
Source.getFileID(MatchedExpr->getBeginLoc()), "<bit>");
}
+ } else if (const auto *MatchedExpr =
+ Result.Nodes.getNodeAs<BinaryOperator>("rotate_expr")) {
+ const auto *MatchedVarDecl = Result.Nodes.getNodeAs<VarDecl>("v");
----------------
vbvictor wrote:
`UseStdBitCheck::check` is getting rather big with more and more cases.
Would be highly appreciated if we split processing of each match into separate
functions, like `handleRotate()`, `handlePopcount()`, etc... (can be a separate
PR)
Many checks should already follow this pattern, grep by `handle*`
https://github.com/llvm/llvm-project/pull/186324
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits