================
@@ -2237,6 +2237,21 @@ bool 
BinaryOperator::isNullPointerArithmeticExtension(ASTContext &Ctx,
   return true;
 }
 
+bool BinaryOperator::oneOfWraps(const ASTContext &Ctx) const {
+  llvm::SmallVector<Expr *, 2> Both = {getLHS(), getRHS()};
----------------
erichkeane wrote:

Suggest instead:

```
return children().end() != llvm::find_if(children(), [](const Expr *E) {
return E && !E->IgnoreParenImpCasts()->getType().isNull() && 
E->IgnoreParenImpCasts()->getType()->hasAttr(attr::Wraps);
 });
```

Alternatively, you could make that significantly easier by implementing 
`hasWrapAttr` on `QualType` which could just do `return !isNull() && 
getTypePtr()->hasAttr(attr::Wraps);`.

https://github.com/llvm/llvm-project/pull/86618
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to