phyBrackets created this revision.
Herald added subscribers: manas, steakhal, ASDenysPetrov, martong, dkrupp, 
donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, 
xazax.hun.
Herald added a project: All.
phyBrackets requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121045

Files:
  clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp


Index: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
===================================================================
--- clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
+++ clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
@@ -107,11 +107,7 @@
       dyn_cast<BinaryOperator>(Ex->IgnoreParenCasts());
     if (!BO)
       break;
-    if (BO->getOpcode() == BO_Assign) {
-      Ex = BO->getRHS();
-      continue;
-    }
-    if (BO->getOpcode() == BO_Comma) {
+    if (BO->getOpcode() == BO_Assign || BO->getOpcode() == BO_Comma) {
       Ex = BO->getRHS();
       continue;
     }


Index: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
===================================================================
--- clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
+++ clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
@@ -107,11 +107,7 @@
       dyn_cast<BinaryOperator>(Ex->IgnoreParenCasts());
     if (!BO)
       break;
-    if (BO->getOpcode() == BO_Assign) {
-      Ex = BO->getRHS();
-      continue;
-    }
-    if (BO->getOpcode() == BO_Comma) {
+    if (BO->getOpcode() == BO_Assign || BO->getOpcode() == BO_Comma) {
       Ex = BO->getRHS();
       continue;
     }
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to