@@ -40,7 +40,11 @@ static_assert(
"Type is insufficiently aligned");
APValue::LValueBase::LValueBase(const ValueDecl *P, unsigned I, unsigned V)
-: Ptr(P ? cast(P->getCanonicalDecl()) : nullptr), Local{I, V} {}
+: Ptr(P ? cast(P->getCanonicalDecl()->isInvalidDecl()
@@ -40,7 +40,11 @@ static_assert(
"Type is insufficiently aligned");
APValue::LValueBase::LValueBase(const ValueDecl *P, unsigned I, unsigned V)
-: Ptr(P ? cast(P->getCanonicalDecl()) : nullptr), Local{I, V} {}
+: Ptr(P ? cast(P->getCanonicalDecl()->isInvalidDecl()
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Qizhi Hu (jcsxky)
Changes
`APValue::LValueBase::LValueBase` constructs `ValueDecl` with its
canonicalDecl, even though it's invalid. And when obtain its type, it also
check all redecls and ignore checking if it's valid. This will cause cr
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/77893
`APValue::LValueBase::LValueBase` constructs `ValueDecl` with its
canonicalDecl, even though it's invalid. And when obtain its type, it also
check all redecls and ignore checking if it's valid. This will cause cr