[Mlir-commits] [clang] [clang-tools-extra] [llvm] [mlir] [clang][lldb][mlir] Fix some identical sub-expressions warnings (NFC) (PR #95715)

Shivam Gupta llvmlistbot at llvm.org
Fri Jul 26 04:59:48 PDT 2024


================
@@ -96,7 +96,7 @@ bool areStatementsIdentical(const Stmt *FirstStmt, const Stmt *SecondStmt,
   if (FirstStmt == SecondStmt)
     return true;
 
-  if (FirstStmt->getStmtClass() != FirstStmt->getStmtClass())
+  if (FirstStmt->getStmtClass() != SecondStmt->getStmtClass())
----------------
xgupta wrote:

@PiotrZSL If I removed this condition and ninja target still passes. Shall I remove this or can you provide a test case or guidance? I have this function is used in BranchCloneCheck.cpp but I am not sure how the test case look like. 

https://github.com/llvm/llvm-project/pull/95715


More information about the Mlir-commits mailing list