[clang] [C++] Fix a crash with __thread and dependent types (PR #140542)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon May 19 07:23:15 PDT 2025
================
@@ -14608,6 +14608,10 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {
std::optional<bool> CacheHasConstInit;
const Expr *CacheCulprit = nullptr;
auto checkConstInit = [&]() mutable {
+ const Expr *Init = var->getInit();
+ if (Init->isInstantiationDependent())
----------------
erichkeane wrote:
Oh wait, 14706 seems to protect against that, it has the value-dependent check. So NVM.
https://github.com/llvm/llvm-project/pull/140542
More information about the cfe-commits
mailing list