`clangd` не может проиндексировать файл, что приводит к ошибке - PullRequest
0 голосов
/ 14 марта 2020

clangd не удается проиндексировать один из моих файлов по незаметной для меня причине.
Ниже приводится вывод, который был передан мне через stderr:

I[23:22:17.080] clangd version 9.0.1 
I[23:22:17.080] Working directory: /media/i/EXTERNAL/git-repos/eos
I[23:22:17.080] argv[0]: /home/i/install/bin/clangd
I[23:22:17.080] Starting LSP over stdin/stdout
I[23:22:17.081] <-- initialize(1)
I[23:22:17.081] --> reply:initialize(1) 0 ms
I[23:22:17.189] <-- initialized
I[23:22:17.189] unhandled notification initialized
I[23:22:17.243] <-- textDocument/didOpen
I[23:22:17.257] <-- textDocument/documentHighlight(2)
I[23:22:17.275] Enqueueing 621 commands for indexing
I[23:22:17.275] Updating file /home/i/0EXTERNAL/git-repos/eos/libraries/chain/controller.cpp with command 
[/home/i/0EXTERNAL/git-repos/eos/Release/libraries/chain]
/home/i/install/bin/clang++ --driver-mode=g++ -DEOSIO_WABT_RUNTIME_ENABLED -I/home/i/0EXTERNAL/git-repos/eos/libraries/chain/include -I/home/i/0EXTERNAL/git-repos/eos/Release/libraries/chain/include -I/home/i/0EXTERNAL/git-repos/eos/libraries/chain/../wasm-jit/Include -I/home/i/0EXTERNAL/git-repos/eos/libraries/chain/libraries/eos-vm/include -I/home/i/0EXTERNAL/git-repos/eos/libraries/wabt -I/home/i/0EXTERNAL/git-repos/eos/Release/libraries/wabt -I/home/i/0EXTERNAL/git-repos/eos/libraries/fc/include -I/home/i/0EXTERNAL/git-repos/eos/libraries/fc/vendor/websocketpp -I/home/i/0EXTERNAL/git-repos/eos/libraries/fc/secp256k1/upstream -I/home/i/0EXTERNAL/git-repos/eos/libraries/fc/secp256k1/upstream/include -I/home/i/0EXTERNAL/git-repos/eos/libraries/chainbase/include -I/home/i/0EXTERNAL/git-repos/eos/libraries/wasm-jit/Source/Runtime/../../../chain/include -I/home/i/0EXTERNAL/git-repos/eos/libraries/softfloat/source/include -I/home/i/0EXTERNAL/git-repos/eos/libraries/softfloat/source/8086-SSE -I/home/i/0EXTERNAL/git-repos/eos/libraries/softfloat/build/Linux-x86_64-GCC -I/home/i/0EXTERNAL/git-repos/eos/libraries/builtins -I/home/i/0EXTERNAL/git-repos/eos/libraries/builtins../softfloat/source/include -isystem /home/i/2boosts/boost_1_71_0 -Wall -Wno-invalid-partial-specialization -O3 -DNDEBUG -pthread -std=gnu++17 -o CMakeFiles/eosio_chain.dir/controller.cpp.o -c /home/i/0EXTERNAL/git-repos/eos/libraries/chain/controller.cpp -fsyntax-only -resource-dir=/home/i/install/lib/clang/9.0.1
I[23:22:17.670] Indexed /home/i/0EXTERNAL/git-repos/eos/libraries/softfloat/source/f128_mul.c (459 symbols, 1444 refs, 25 files)
I[23:22:17.845] Indexed /home/i/0EXTERNAL/git-repos/eos/libraries/softfloat/source/s_approxRecip32_1.c (86 symbols, 111 refs, 18 files)
I[23:22:17.943] Indexed /home/i/0EXTERNAL/git-repos/eos/libraries/softfloat/source/s_roundPackToExtF80.c (440 symbols, 1285 refs, 24 files)
I[23:22:17.992] Indexed /home/i/0EXTERNAL/git-repos/eos/libraries/softfloat/source/extF80_to_i64.c (459 symbols, 1309 refs, 25 files)
 #0 0x00005586dceaea5a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/i/install/bin/clangd+0x396a5a)
 #1 0x00005586dceac844 llvm::sys::RunSignalHandlers() (/home/i/install/bin/clangd+0x394844)
 #2 0x00005586dceac982 SignalHandler(int) (/home/i/install/bin/clangd+0x394982)
 #3 0x00007f823b740890 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00005586dcefa278 clang::ASTContext::getTypeInfoImpl(clang::Type const*) const (/home/i/install/bin/clangd+0x3e2278)
 #5 0x00005586dcef21d5 clang::ASTContext::getTypeInfo(clang::Type const*) const (/home/i/install/bin/clangd+0x3da1d5)
 #6 0x00005586dcef21d5 clang::ASTContext::getTypeInfo(clang::Type const*) const (/home/i/install/bin/clangd+0x3da1d5)
 #7 0x00005586dcef21d5 clang::ASTContext::getTypeInfo(clang::Type const*) const (/home/i/install/bin/clangd+0x3da1d5)
 #8 0x00005586dcef89a9 clang::ASTContext::getTypeAlignInChars(clang::Type const*) const (/home/i/install/bin/clangd+0x3e09a9)
 #9 0x00005586dcfb1316 clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::IntExprEvaluator, bool>::Visit(clang::Stmt const*) (/home/i/install/bin/clangd+0x499316)
#10 0x00005586dcf98a2d Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) (/home/i/install/bin/clangd+0x480a2d)
#11 0x00005586dcf9c6c1 EvaluateAsRValue((anonymous namespace)::EvalInfo&, clang::Expr const*, clang::APValue&) (/home/i/install/bin/clangd+0x4846c1)
#12 0x00005586dcf9c8df EvaluateAsRValue(clang::Expr const*, clang::Expr::EvalResult&, clang::ASTContext const&, (anonymous namespace)::EvalInfo&) (/home/i/install/bin/clangd+0x4848df)
#13 0x00005586dcf9d0f8 clang::Expr::EvaluateKnownConstInt(clang::ASTContext const&, llvm::SmallVectorImpl<std::pair<clang::SourceLocation, clang::PartialDiagnostic> >*) const (/home/i/install/bin/clangd+0x4850f8)
#14 0x00005586dd0b17bb clang::AlignedAttr::getAlignment(clang::ASTContext&) const (/home/i/install/bin/clangd+0x5997bb)
#15 0x00005586dcf35249 clang::Decl::getMaxAlignment() const (/home/i/install/bin/clangd+0x41d249)
#16 0x00005586dd03cde3 (anonymous namespace)::ItaniumRecordLayoutBuilder::LayoutField(clang::FieldDecl const*, bool) (.part.397) (/home/i/install/bin/clangd+0x524de3)
#17 0x00005586dd03d505 (anonymous namespace)::ItaniumRecordLayoutBuilder::LayoutFields(clang::RecordDecl const*) (/home/i/install/bin/clangd+0x525505)
#18 0x00005586dd03a295 clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const (/home/i/install/bin/clangd+0x522295)
#19 0x00005586dd039a40 clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const (/home/i/install/bin/clangd+0x521a40)
#20 0x00005586dcefa41a clang::ASTContext::getTypeInfoImpl(clang::Type const*) const (/home/i/install/bin/clangd+0x3e241a)
#21 0x00005586dcef21d5 clang::ASTContext::getTypeInfo(clang::Type const*) const (/home/i/install/bin/clangd+0x3da1d5)
#22 0x00005586dcef21d5 clang::ASTContext::getTypeInfo(clang::Type const*) const (/home/i/install/bin/clangd+0x3da1d5)
#23 0x00005586dcef8785 clang::ASTContext::getTypeInfoInChars(clang::Type const*) const (/home/i/install/bin/clangd+0x3e0785)
#24 0x00005586dcef8829 clang::ASTContext::getTypeSizeInChars(clang::QualType) const (/home/i/install/bin/clangd+0x3e0829)
#25 0x00005586dcf82f31 HandleSizeof((anonymous namespace)::EvalInfo&, clang::SourceLocation, clang::QualType, clang::CharUnits&) (/home/i/install/bin/clangd+0x46af31)
#26 0x00005586dcfb1878 clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::IntExprEvaluator, bool>::Visit(clang::Stmt const*) (/home/i/install/bin/clangd+0x499878)
#27 0x00005586dcf98a2d Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) (/home/i/install/bin/clangd+0x480a2d)
#28 0x00005586dcfd440f clang::Expr::EvaluateAsConstantExpr(clang::Expr::EvalResult&, clang::Expr::ConstExprUsage, clang::ASTContext const&) const (/home/i/install/bin/clangd+0x4bc40f)
#29 0x00005586dd844750 CheckConvertedConstantExpression(clang::Sema&, clang::Expr*, clang::QualType, clang::APValue&, clang::Sema::CCEKind, bool) (/home/i/install/bin/clangd+0xd2c750)
#30 0x00005586dd8aa58c clang::Sema::CheckTemplateArgument(clang::NonTypeTemplateParmDecl*, clang::QualType, clang::Expr*, clang::TemplateArgument&, clang::Sema::CheckTemplateArgumentKind) (/home/i/install/bin/clangd+0xd9258c)
#31 0x00005586dd8b0354 clang::Sema::CheckTemplateArgument(clang::NamedDecl*, clang::TemplateArgumentLoc&, clang::NamedDecl*, clang::SourceLocation, clang::SourceLocation, unsigned int, llvm::SmallVectorImpl<clang::TemplateArgument>&, clang::Sema::CheckTemplateArgumentKind) (/home/i/install/bin/clangd+0xd98354)
#32 0x00005586dd8b1966 clang::Sema::CheckTemplateArgumentList(clang::TemplateDecl*, clang::SourceLocation, clang::TemplateArgumentListInfo&, bool, llvm::SmallVectorImpl<clang::TemplateArgument>&, bool) (/home/i/install/bin/clangd+0xd99966)
#33 0x00005586dd8b27c6 clang::Sema::CheckTemplateIdType(clang::TemplateName, clang::SourceLocation, clang::TemplateArgumentListInfo&) (/home/i/install/bin/clangd+0xd9a7c6)
#34 0x00005586dd96b46e clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&, clang::TemplateSpecializationTypeLoc, clang::TemplateName) (/home/i/install/bin/clangd+0xe5346e)
#35 0x00005586dd967464 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformTSIInObjectScope(clang::TypeLoc, clang::QualType, clang::NamedDecl*, clang::CXXScopeSpec&) (/home/i/install/bin/clangd+0xe4f464)
#36 0x00005586dd967928 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformNestedNameSpecifierLoc(clang::NestedNameSpecifierLoc, clang::QualType, clang::NamedDecl*) (/home/i/install/bin/clangd+0xe4f928)
#37 0x00005586dd96b90f clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformDependentNameType(clang::TypeLocBuilder&, clang::DependentNameTypeLoc, bool) (/home/i/install/bin/clangd+0xe5390f)
#38 0x00005586dd962c58 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&, clang::TypeLoc) (/home/i/install/bin/clangd+0xe4ac58)
#39 0x00005586dd965ac1 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) (/home/i/install/bin/clangd+0xe4dac1)
#40 0x00005586dd96bd3f clang::Sema::SubstType(clang::TypeSourceInfo*, clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation, clang::DeclarationName, bool) (/home/i/install/bin/clangd+0xe53d3f)
#41 0x00005586dd98c503 clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(clang::TypedefNameDecl*, bool) (/home/i/install/bin/clangd+0xe74503)
#42 0x00005586dd98ca3f clang::TemplateDeclInstantiator::VisitTypedefDecl(clang::TypedefDecl*) (/home/i/install/bin/clangd+0xe74a3f)
#43 0x00005586dd96ce41 clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*, clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&, clang::TemplateSpecializationKind, bool) (/home/i/install/bin/clangd+0xe54e41)
#44 0x00005586dd98016f clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation, clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind, bool) (/home/i/install/bin/clangd+0xe6816f)
#45 0x00005586dd9be33d clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, clang::Sema::TypeDiagnoser*) (/home/i/install/bin/clangd+0xea633d)
#46 0x00005586dd9be5b5 clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType, clang::Sema::TypeDiagnoser&) (/home/i/install/bin/clangd+0xea65b5)
#47 0x00005586dd9be74f clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType, unsigned int) (/home/i/install/bin/clangd+0xea674f)
#48 0x00005586dd4f0ebe clang::Sema::CheckFieldDecl(clang::DeclarationName, clang::QualType, clang::TypeSourceInfo*, clang::RecordDecl*, clang::SourceLocation, bool, clang::Expr*, clang::InClassInitStyle, clang::SourceLocation, clang::AccessSpecifier, clang::NamedDecl*, clang::Declarator*) (/home/i/install/bin/clangd+0x9d8ebe)
#49 0x00005586dd4f17e1 clang::Sema::HandleField(clang::Scope*, clang::RecordDecl*, clang::SourceLocation, clang::Declarator&, clang::Expr*, clang::InClassInitStyle, clang::AccessSpecifier) (/home/i/install/bin/clangd+0x9d97e1)
#50 0x00005586dd5d526d clang::Sema::ActOnCXXMemberDeclarator(clang::Scope*, clang::AccessSpecifier, clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>, clang::Expr*, clang::VirtSpecifiers const&, clang::InClassInitStyle) (/home/i/install/bin/clangd+0xabd26d)
#51 0x00005586de068897 clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject*) (/home/i/install/bin/clangd+0x1550897)
#52 0x00005586de06abea clang::Parser::ParseCXXClassMemberDeclarationWithPragmas(clang::AccessSpecifier&, clang::Parser::ParsedAttributesWithRange&, clang::TypeSpecifierType, clang::Decl*) (/home/i/install/bin/clangd+0x1552bea)
#53 0x00005586de06b579 clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int, clang::Decl*) (/home/i/install/bin/clangd+0x1553579)
#54 0x00005586de06d6aa clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::Parser::ParsedAttributesWithRange&) (/home/i/install/bin/clangd+0x15556aa)
#55 0x00005586de04ea8f clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) (/home/i/install/bin/clangd+0x1536a8f)
#56 0x00005586de02d1e8 clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/home/i/install/bin/clangd+0x15151e8)
#57 0x00005586de02e0a1 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.207) (/home/i/install/bin/clangd+0x15160a1)
#58 0x00005586de035316 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/home/i/install/bin/clangd+0x151d316)
#59 0x00005586de064d06 clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) (/home/i/install/bin/clangd+0x154cd06)
#60 0x00005586de065963 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) (/home/i/install/bin/clangd+0x154d963)
#61 0x00005586de0566de clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) (/home/i/install/bin/clangd+0x153e6de)
#62 0x00005586de03533a clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/home/i/install/bin/clangd+0x151d33a)
#63 0x00005586de064d06 clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) (/home/i/install/bin/clangd+0x154cd06)
#64 0x00005586de065963 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) (/home/i/install/bin/clangd+0x154d963)
#65 0x00005586de0566de clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) (/home/i/install/bin/clangd+0x153e6de)
#66 0x00005586de03533a clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/home/i/install/bin/clangd+0x151d33a)
#67 0x00005586de035d79 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool) (/home/i/install/bin/clangd+0x151dd79)
#68 0x00005586de0362a5 clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) (/home/i/install/bin/clangd+0x151e2a5)
#69 0x00005586de029c56 clang::Parse
Process clangd stderr finished

...