[PATCH] D38921: [analyzer] LoopUnrolling: update the matched assignment operators

Peter Szecsi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 14 05:50:40 PDT 2017


szepet created this revision.
Herald added subscribers: baloghadamsoftware, whisperity.

Extended the matched assignment operators when checking for bound changes in a body of the loop. This updated list covers all the (current) possible assignments.


https://reviews.llvm.org/D38921

Files:
  lib/StaticAnalyzer/Core/LoopUnrolling.cpp


Index: lib/StaticAnalyzer/Core/LoopUnrolling.cpp
===================================================================
--- lib/StaticAnalyzer/Core/LoopUnrolling.cpp
+++ lib/StaticAnalyzer/Core/LoopUnrolling.cpp
@@ -99,7 +99,10 @@
                         declRefExpr(to(varDecl(VarNodeMatcher)))))),
       binaryOperator(anyOf(hasOperatorName("="), hasOperatorName("+="),
                            hasOperatorName("/="), hasOperatorName("*="),
-                           hasOperatorName("-=")),
+                           hasOperatorName("-="), hasOperatorName("%="),
+                           hasOperatorName("&="), hasOperatorName("|="),
+                           hasOperatorName("^="), hasOperatorName("<<="),
+                           hasOperatorName(">>=")),
                      hasLHS(ignoringParenImpCasts(
                          declRefExpr(to(varDecl(VarNodeMatcher)))))));
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38921.119018.patch
Type: text/x-patch
Size: 900 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171014/78653f98/attachment.bin>


More information about the cfe-commits mailing list