[PATCH] D76086: [Sema][SVE] Reject arithmetic on pointers to sizeless types
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 12 15:45:27 PDT 2020
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM
People are going to want to iterate over arrays in memory to write simple intrinsic loops. If we don't allow `p + i` to work, people will be forced to write `(__SVInt8_t*)((char*)p + i * svcntb())`. Which is the same thing, just a lot uglier. And it wouldn't really be that crazy to support `sizeof(__SVInt8_t)`. I mean, it's effectively just a different way of spelling `svcntb()`. I guess we can always relax it later, though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76086/new/
https://reviews.llvm.org/D76086
More information about the cfe-commits
mailing list