njames93 added inline comments.

================
Comment at: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp:26
+    // of the left and right statements.
+    const Expr *LHSExpr = llvm::dyn_cast<Expr>(LHS);
+    const Expr *RHSExpr = llvm::dyn_cast<Expr>(RHS);
----------------
Eugene.Zelenko wrote:
> `auto` could be used because type is spelled in same statement.
No need for `dyn_cast` here, we already know it's an `Expr` so `cast` would be 
sufficient.


================
Comment at: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp:28
+    const Expr *RHSExpr = llvm::dyn_cast<Expr>(RHS);
+    if (LHSExpr->containsErrors() && RHSExpr->containsErrors()) {
+      return false;
----------------
Surely we can bail if only one of the sides contains an errors.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128402/new/

https://reviews.llvm.org/D128402

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to