Rename CheckBaseDerived to something more general and call it in GetPtrField() as well, so we don't crash later in Pointer::toAPValue().
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM
clang/test/AST/Interp/records.cpp | ||
---|---|---|
533–557 | Neat! For the tests in this namespace, Clang and ICC agree, GCC and MSVC agree, and users get to cry: https://godbolt.org/z/7EWWrY5z6 |
clang/test/AST/Interp/records.cpp | ||
---|---|---|
533–557 | Yeah, unfortunate but I am pretty sure clang is correct on both of those. |
clang/test/AST/Interp/records.cpp | ||
---|---|---|
533–557 | I think Clang is correct on one of those, but not both of them. I think Clang is correct to reject constexpr const int *pn = &(&b + 1)->n; as that involves dereferencing the one-past-the-end pointer, but I think Clang is wrong to reject constexpr A *a2 = &b + 1; as there's no dereference there. |
Neat! For the tests in this namespace, Clang and ICC agree, GCC and MSVC agree, and users get to cry: https://godbolt.org/z/7EWWrY5z6