riccibruno added inline comments.
================
Comment at: test/SemaCXX/array-bounds.cpp:294
+ C &f() { return reinterpret_cast<C *>(xxx)[1]; } // no-warning
+ C &g() { return reinterpret_cast<C *>(xxx)[2]; } // expected-warning {{array
index 2 is past the end of the array (which contains 2 elements)}}
+}
----------------
efriedma wrote:
> Not sure it actually makes sense to print a diagnostic here... at least, not
> this diagnostic. We don't know whether the result here is actually out of
> bounds.
Right. I think that the right thing to do then is to not print anything
since we really don't have any information about whether this
is out of bounds.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55862/new/
https://reviews.llvm.org/D55862
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits