================
@@ -71,6 +71,17 @@ struct NotLengthExprForStringNode {
   ASTContext *Context;
 };
 
+static bool isNegativeComparison(const Expr *ComparisonExpr) {
+  if (const auto *BO = llvm::dyn_cast<BinaryOperator>(ComparisonExpr)) {
+    return BO->getOpcode() == BO_NE;
+  }
----------------
nicovank wrote:

Nit: personally I also prefer braces in all cases but LLVM style says no braces 
for short single statements like this one.

```suggestion
  if (const auto *BO = llvm::dyn_cast<BinaryOperator>(ComparisonExpr))
    return BO->getOpcode() == BO_NE;
```

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

Reply via email to