https://github.com/ahatanak edited
https://github.com/llvm/llvm-project/pull/93749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/93749
>From 4648f46f5e15d5747596347feaef85069a8ce4df Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Wed, 29 May 2024 15:19:58 -0700
Subject: [PATCH 1/3] Use cast_or_null instead of cast
`Eval->Value.get` returns
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/93749
>From 4648f46f5e15d5747596347feaef85069a8ce4df Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Wed, 29 May 2024 15:19:58 -0700
Subject: [PATCH 1/3] Use cast_or_null instead of cast
`Eval->Value.get` returns
https://github.com/cor3ntin approved this pull request.
LGTM, thanks for the fix!
https://github.com/llvm/llvm-project/pull/93749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov commented:
I see it stops crashing, but is it actually working now?
Why `hasInit` returns true, but the variable doesn't actually have an
initializer?
Shouldn't the fix go there?
https://github.com/llvm/llvm-project/pull/93749
___
ahatanak wrote:
`hasInit` checks whether `VarDecl::Init`'s pointer is null. But
`VarDecl::ensureEvaluatedStmt` creates an `EvaluatedStmt` if there isn't one
already, after which `hasInit` returns true.
https://github.com/llvm/llvm-project/blob/3af717d661e9fe8d562181b933a373ca58e41b27/clang/li
ahatanak wrote:
I can see if we can make `hasInit` check that too or rename the function after
committing this patch.
https://github.com/llvm/llvm-project/pull/93749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/93749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits