[PATCH] D26691: [analyzer] Run clang-format and fix style

Anna Zaks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 30 22:56:58 PST 2016


zaks.anna added a comment.

I am not a big fan of loosing svn blame only to fix formatting, but since you are modifying this code anyway, it's fine by me.

Artem and Devin, what is your opinion on this?



================
Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:459
   // Notice that the lower bound is greater than the upper bound.
-  RangeSet New = GetRange(St, Sym).Intersect(getBasicVals(), F, Upper, Lower);
+  RangeSet New = getRange(St, Sym).Intersect(getBasicVals(), F, Upper, Lower);
   return New.isEmpty() ? nullptr : St->set<ConstraintRange>(Sym, New);
----------------
We should use lower case function names.


================
Comment at: lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp:228
 static void computeAdjustment(SymbolRef &Sym, llvm::APSInt &Adjustment) {
-  // Is it a "($sym+constant1)" expression?
+  // Is it a "($Sym+constant1)" expression?
   if (const SymIntExpr *SE = dyn_cast<SymIntExpr>(Sym)) {
----------------
I don't think we should change the case in the comment.


================
Comment at: lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp:255
 
-  // We only handle simple comparisons of the form "$sym == constant"
-  // or "($sym+constant1) == constant2".
+  // We only handle simple comparisons of the form "$Sym == constant"
+  // or "($Sym+constant1) == constant2".
----------------
Not sure the comment needs to change.


https://reviews.llvm.org/D26691





More information about the cfe-commits mailing list