[PATCH] D159126: [Clang] Add captures to the instantiation scope of lambda call operators
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 29 11:13:50 PDT 2023
cor3ntin added a subscriber: beanz.
cor3ntin added a comment.
@beanz The changes to TreeTransform.h cause a lot of HLSL test failures similar to this one:
clang: /home/cor3ntin/dev/compilers/LLVM/llvm-project/clang/lib/AST/ExprClassification.cpp:57: Cl clang::Expr::ClassifyImpl(clang::ASTContext &, clang::SourceLocation *) const: Assertion `isLValue()' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang -cc1 -internal-isystem /home/cor3ntin/dev/compilers/LLVM/build-release/lib/clang/18/include -nostdsysteminc -triple dxil-pc-shadermodel6.0-compute -emit-llvm -o - -O0 /home/cor3ntin/dev/compilers/LLVM/llvm-project/clang/test/CodeGenHLSL/builtins/RWBuffer-subscript.hlsl
1. <eof> parser at end of file
2. instantiating function definition 'hlsl::RWBuffer<int>::RWBuffer'
#0 0x00005562645f33c7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x3d663c7)
#1 0x00005562645f0f9e llvm::sys::RunSignalHandlers() (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x3d63f9e)
#2 0x00005562645f3bba SignalHandler(int) Signals.cpp:0:0
#3 0x00007fc625c3c4b0 (/lib/x86_64-linux-gnu/libc.so.6+0x3c4b0)
#4 0x00007fc625c90ffb __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#5 0x00007fc625c90ffb __pthread_kill_internal ./nptl/pthread_kill.c:78:10
#6 0x00007fc625c90ffb pthread_kill ./nptl/pthread_kill.c:89:10
#7 0x00007fc625c3c406 raise ./signal/../sysdeps/posix/raise.c:27:6
#8 0x00007fc625c2287c abort ./stdlib/abort.c:81:7
#9 0x00007fc625c2279b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x00007fc625c33b86 (/lib/x86_64-linux-gnu/libc.so.6+0x33b86)
#11 0x0000556267a3f1a9 clang::Expr::ClassifyImpl(clang::ASTContext&, clang::SourceLocation*) const (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x71b21a9)
#12 0x0000556267a3fa37 clang::Expr::isModifiableLvalue(clang::ASTContext&, clang::SourceLocation*) const (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x71b2a37)
#13 0x0000556266ffbd1a CheckForModifiableLvalue(clang::Expr*, clang::SourceLocation, clang::Sema&) SemaExpr.cpp:0:0
#14 0x0000556266ffb4b4 clang::Sema::CheckAssignmentOperands(clang::Expr*, clang::ActionResult<clang::Expr*, true>&, clang::SourceLocation, clang::QualType, clang::BinaryOperatorKind) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x676e4b4)
#15 0x0000556266fddd2e clang::Sema::CreateBuiltinBinOp(clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x6750d2e)
#16 0x0000556267572779 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformBinaryOperator(clang::BinaryOperator*) SemaTemplateInstantiate.cpp:0:0
#17 0x000055626756ceb5 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformStmt(clang::Stmt*, clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::StmtDiscardKind) SemaTemplateInstantiate.cpp:0:0
#18 0x000055626758c4ba clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*, bool) SemaTemplateInstantiate.cpp:0:0
#19 0x000055626756ce43 clang::Sema::SubstStmt(clang::Stmt*, clang::MultiLevelTemplateArgumentList const&) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x6cdfe43)
#20 0x00005562675c6bab clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x6d39bab)
#21 0x00005562675c9cbe clang::Sema::PerformPendingInstantiations(bool) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x6d3ccbe)
#22 0x0000556266bf08a5 clang::Sema::ActOnEndOfTranslationUnitFragment(clang::Sema::TUFragmentKind) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x63638a5)
#23 0x0000556266bf1028 clang::Sema::ActOnEndOfTranslationUnit() (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x6364028)
#24 0x0000556266ab548c clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x622848c)
#25 0x0000556266ab007e clang::ParseAST(clang::Sema&, bool, bool) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x622307e)
#26 0x000055626519ac60 clang::FrontendAction::Execute() (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x490dc60)
#27 0x000055626510c96f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x487f96f)
#28 0x000055626527cc5b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x49efc5b)
#29 0x000055626341cf64 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x2b8ff64)
#30 0x0000556263419e3d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#31 0x0000556263418b9e clang_main(int, char**, llvm::ToolContext const&) (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x2b8bb9e)
#32 0x00005562634298d1 main (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x2b9c8d1)
#33 0x00007fc625c23a90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#34 0x00007fc625c23b49 call_init ./csu/../csu/libc-start.c:128:20
#35 0x00007fc625c23b49 __libc_start_main ./csu/../csu/libc-start.c:347:5
#36 0x0000556263416325 _start (/home/cor3ntin/dev/compilers/LLVM/build-release/bin/clang+0x2b89325)
FileCheck error: '<stdin>' is empty.
FileCheck command line: /home/cor3ntin/dev/compilers/LLVM/build-release/bin/FileCheck /home/cor3ntin/dev/compilers/LLVM/llvm-project/clang/test/CodeGenHLSL/builtins/RWBuffer-subscript.hlsl
any idea would be appreciated! Thanks
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159126/new/
https://reviews.llvm.org/D159126
More information about the cfe-commits
mailing list