[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 15 02:05:47 PDT 2017


a.sidorin added a comment.

Hello Daniel,
Your patch looks mostly good to me. I have only minor naming comments.



================
Comment at: lib/StaticAnalyzer/Core/CheckerHelpers.cpp:99
+bool clang::ento::isExprResultConformsComparisonRule(CheckerContext &C,
+                                                     BinaryOperatorKind BOK,
+                                                     const Expr *LExpr,
----------------
CompRule?


================
Comment at: lib/StaticAnalyzer/Core/CheckerHelpers.cpp:100
+                                                     BinaryOperatorKind BOK,
+                                                     const Expr *LExpr,
+                                                     const SVal RVal) {
----------------
I think we should rename these variables to LHSExpr, RHSVal, LHSVal. I don't like LVal/RVal because they may be associated with rvalue/lvalue types which is not what we want.


Repository:
  rL LLVM

https://reviews.llvm.org/D30295





More information about the cfe-commits mailing list