[PATCH] D149149: [clang][Interp] Check one-past-the-end pointers in GetPtrField
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 3 10:47:41 PDT 2023
shafik added a subscriber: rsmith.
shafik added inline comments.
================
Comment at: clang/test/AST/Interp/records.cpp:509
constexpr A *a2 = &b + 1; // expected-error {{must be initialized by a constant expression}} \
// expected-note {{cannot access base class of pointer past the end of object}} \
----------------
@rsmith it looks like you added this diagnostic a while ago see ce1ec5e1f5620 did you mean it to apply to this case? The rules have changed a lot since then so perhaps this was invalid but now is good.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149149/new/
https://reviews.llvm.org/D149149
More information about the cfe-commits
mailing list