[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 14 03:42:31 PDT 2024
alexfh wrote:
It turns out debug build of clang before this patch generated an assertion on the original code as well:
```
assert.h assertion failed at llvm-project/clang/lib/AST/ExprConstant.cpp:15739 in bool clang::Expr::EvaluateAsConstantExpr(EvalResult &, const ASTContext &, ConstantExprKind) const: !isValueDependent() && "Expression evaluator can't be called on a dependent expression."
...
@ 0x5643bcdac9e4 __assert_fail
@ 0x5643b9734df7 clang::Expr::EvaluateAsConstantExpr()
@ 0x5643b89f7fea calculateConstraintSatisfaction<>()
@ 0x5643b89f1bcf CheckConstraintSatisfaction()
@ 0x5643b89f193e clang::Sema::CheckConstraintSatisfaction()
@ 0x5643b90d9f23 clang::Sema::CheckConceptTemplateId()
@ 0x5643b9259656 clang::TreeTransform<>::TransformConceptSpecializationExpr()
@ 0x5643b925ce00 clang::TreeTransform<>::TransformCXXFoldExpr()
@ 0x5643b924b6e0 clang::Sema::SubstConstraintExpr()
@ 0x5643b89f9097 calculateConstraintSatisfaction()::$_0::operator()()
@ 0x5643b89f7f50 calculateConstraintSatisfaction<>()
@ 0x5643b89f1bcf CheckConstraintSatisfaction()
@ 0x5643b89f193e clang::Sema::CheckConstraintSatisfaction()
@ 0x5643b9237c6d FinishTemplateArgumentDeduction<>()
@ 0x5643b9236cd2 llvm::function_ref<>::callback_fn<>()
@ 0x5643b888fa2f clang::Sema::runWithSufficientStackSpace()
@ 0x5643b91c2e17 clang::Sema::DeduceTemplateArguments()
@ 0x5643b9248e19 clang::Sema::InstantiateClassTemplateSpecialization()
@ 0x5643b9334e73 llvm::function_ref<>::callback_fn<>()
@ 0x5643b888fa2f clang::Sema::runWithSufficientStackSpace()
@ 0x5643b931fdc4 clang::Sema::RequireCompleteTypeImpl()
@ 0x5643b931f535 clang::Sema::RequireCompleteType()
@ 0x5643b891bad7 clang::Sema::RequireCompleteDeclContext()
@ 0x5643b90eda4d clang::Sema::CheckTypenameType()
@ 0x5643b926edd2 clang::TreeTransform<>::TransformDependentNameType()
@ 0x5643b9243d1c clang::TreeTransform<>::TransformType()
@ 0x5643b92436ff clang::TreeTransform<>::TransformType()
@ 0x5643b9244293 clang::Sema::SubstType()
@ 0x5643b90d0e8a clang::Sema::CheckTemplateIdType()
@ 0x5643b90d5015 clang::Sema::ActOnTemplateIdType()
@ 0x5643b8674084 clang::Parser::AnnotateTemplateIdTokenAsType()
@ 0x5643b86536cf clang::Parser::ParseDeclarationSpecifiers()
@ 0x5643b864fffa clang::Parser::ParseSpecifierQualifierList()
@ 0x5643b863da31 clang::Parser::ParseTypeName()
@ 0x5643b86262bd clang::Parser::ParseAliasDeclarationAfterDeclarator()
@ 0x5643b8624ea0 clang::Parser::ParseUsingDeclaration()
@ 0x5643b8623e70 clang::Parser::ParseUsingDirectiveOrDeclaration()
@ 0x5643b864b6ef clang::Parser::ParseDeclaration()
@ 0x5643b868a9a4 clang::Parser::ParseStatementOrDeclarationAfterAttributes()
@ 0x5643b8689d78 clang::Parser::ParseStatementOrDeclaration()
@ 0x5643b8693bc0 clang::Parser::ParseCompoundStatementBody()
@ 0x5643b8694bce clang::Parser::ParseFunctionStatementBody()
@ 0x5643b85da8ad clang::Parser::ParseFunctionDefinition()
@ 0x5643b864df89 clang::Parser::ParseDeclGroup()
@ 0x5643b85d8ec9 clang::Parser::ParseDeclOrFunctionDefInternal()
@ 0x5643b85d868e clang::Parser::ParseDeclarationOrFunctionDefinition()
@ 0x5643b85d7434 clang::Parser::ParseExternalDeclaration()
@ 0x5643b8622693 clang::Parser::ParseInnerNamespace()
@ 0x5643b8621893 clang::Parser::ParseNamespace()
@ 0x5643b864b7de clang::Parser::ParseDeclaration()
@ 0x5643b85d6fb6 clang::Parser::ParseExternalDeclaration()
@ 0x5643b85d516b clang::Parser::ParseTopLevelDecl()
@ 0x5643b85ceebe clang::ParseAST()
@ 0x5643b831a4c3 clang::FrontendAction::Execute()
@ 0x5643b8294efd clang::CompilerInstance::ExecuteAction()
@ 0x5643b717f84e clang::ExecuteCompilerInvocation()
@ 0x5643b71737c6 cc1_main()
@ 0x5643b7171066 ExecuteCC1Tool()
@ 0x5643b843fe3e llvm::function_ref<>::callback_fn<>()
@ 0x5643bcc44415 llvm::CrashRecoveryContext::RunSafely()
@ 0x5643b843f5bb clang::driver::CC1Command::Execute()
@ 0x5643b8400494 clang::driver::Compilation::ExecuteCommand()
@ 0x5643b84007af clang::driver::Compilation::ExecuteJobs()
@ 0x5643b841ea80 clang::driver::Driver::ExecuteCompilation()
@ 0x5643b717061b clang_main()
@ 0x5643b716d834 main
```
I'll try to figure out what's wrong with the original code.
https://github.com/llvm/llvm-project/pull/83997
More information about the cfe-commits
mailing list