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

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 19 02:26:42 PDT 2017


xazax.hun added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/LoopUnrolling.cpp:100
                         declRefExpr(to(varDecl(VarNodeMatcher)))))),
       binaryOperator(anyOf(hasOperatorName("="), hasOperatorName("+="),
                            hasOperatorName("/="), hasOperatorName("*="),
----------------
Maybe instead of enumerating all the assignment operators here it would be better to have a matcher that checks `isAssignmentOp` for CXXOperatorCalls/BinaryOperators? This would be less error prone and more future proof.


https://reviews.llvm.org/D38921





More information about the cfe-commits mailing list