================
@@ -84,6 +84,26 @@ static bool isViableLoop(const CXXForRangeStmt &S, 
ASTContext &Context) {
   });
 }
 
+/// For the all_of_loop pattern (returns false inside, true after), check
+/// whether the if-condition is negated. If it is, the loop is an all_of;
+/// otherwise it is a none_of.
+static bool isNoneOfPattern(const CXXForRangeStmt &Loop) {
----------------
vbvictor wrote:

Can we check this in matchers? We could optionally match the condition that is 
parent of return-stmt, something like: 
`optionally(hasParent(ifStmt(hasCondition(notNegated())).bind("none_of")))`.
Not sure about exact matchers, I think you will need to make `notNegated()`

https://github.com/llvm/llvm-project/pull/182065
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to