[PATCH] D128783: [test] Check for more -fsanitize=array-bounds regressions

Stephan Bergmann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 1 02:06:55 PDT 2022


sberg marked an inline comment as done.
sberg added inline comments.


================
Comment at: clang/test/CodeGen/bounds-checking-fam.c:59
+  // CXX-STRICT-0-NOT: @__ubsan
+  return p->a[i] + (p->a)[i];
+}
----------------
serge-sans-paille wrote:
> Another C++-specific behavior: if the bound results from the substitution of a template parameter, event if its value is 1 it's currently not considered a FAM
I hadn't encountered that in the wild, so didn't bother to create a test for it; but yes, makes sense to add it too


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

https://reviews.llvm.org/D128783



More information about the cfe-commits mailing list