================
@@ -410,3 +409,13 @@ int *nothingIsCertain(int x, int y) {
return mem;
}
+
+struct Empty {};
+struct Empty ZeroSizeElements[10];
+
+struct Empty zeroSizeElements(void) {
+ // FIXME: We probably shouldn't report this access.
+ return ZeroSizeElements[5];
+ // expected-warning@-1 {{Out of bound access to memory after the end of
'ZeroSizeElements'}}
+ // expected-note@-2 {{Access of 'ZeroSizeElements' at byte offset 0, while
it holds only 0 byte}}
----------------
NagyDonat wrote:
Good point, I'll also handle that in the follow-up change.
https://github.com/llvm/llvm-project/pull/210774
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits