[PATCH] D88174: [Sema] Address-space sensitive check for unbounded arrays (v2)
Chris Hamilton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 23 11:34:19 PDT 2020
chrish_ericsson_atx added inline comments.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:14054
+ if (IndexNegated) {
+ index.setIsUnsigned(false);
index = -index;
----------------
This call to index.setIsUnsigned(false) is the only unreviewed part of this change in this file.
================
Comment at: clang/test/Sema/unbounded-array-bounds.c:72-80
+void f6() {
+ int ints[] = {1, 3, 5, 7, 8, 6, 4, 5, 9};
+ int const n_ints = sizeof(ints) / sizeof(int);
+ unsigned long long const N = 3;
+
+ int *middle = &ints[0] + n_ints / 2;
+ // Should NOT produce a warning.
----------------
This function is the only unreviewed part of this change in this file.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88174/new/
https://reviews.llvm.org/D88174
More information about the cfe-commits
mailing list