[PATCH] D79330: [Analyzer][VLASizeChecker] Check for VLA size overflow.

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 15 02:19:23 PDT 2020


whisperity added inline comments.


================
Comment at: clang/test/Analysis/vla-overflow.c:8
+  if (x == BIGINDEX) {
+    // We expect here that size_t is a 64 bit value.
+    // Size of this array should be the first to overflow.
----------------
While it's generally true nowadays, instead of a comment, perhaps turn this (`sizeof(size_t) >= 8`) into an assert, or a condition.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79330





More information about the cfe-commits mailing list