steakhal added inline comments.

================
Comment at: 
clang/lib/StaticAnalyzer/Checkers/SufficientSizeArrayIndexingChecker.cpp:75
+  // Should not warn on literal index expressions.
+  if (dyn_cast<IntegerLiteral>(Index->IgnoreParenCasts()))
+    return;
----------------
Shoudn't we use `isa<>` if we don't use the resulting pointer?


================
Comment at: 
clang/lib/StaticAnalyzer/Checkers/SufficientSizeArrayIndexingChecker.cpp:126
+                            C.getASTContext().UnsignedLongLongTy);
+  if (NumArrayElemsMinusOne.isUnknownOrUndef())
+    return;
----------------
I think its better to stay consistent regards naming.
Use either number literals expressing numeric values, or spell out its name.
I would prefer the latter like: `ConstantOne` with type `SVal`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69318/new/

https://reviews.llvm.org/D69318



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to