<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/69751>69751</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Crash when building project
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mistarro
</td>
</tr>
</table>
<pre>
Clang 16 crashes when building project: https://gitlab.com/gherman/dime:
```
Stack dump:
0. Program arguments: /usr/bin/clang++ -I/home/mistar/documents/development/repos/dime/include/dime/.. -g -std=c++20 -emit-llvm -Xclang -disable-llvm-passes -MD -MT test/CMakeFiles/test_basic.dir/basic.cpp.o -MF CMakeFiles/test_basic.dir/basic.cpp.o.d -o CMakeFiles/test_basic.dir/basic.cpp.o -c /home/mistar/documents/development/repos/dime/test/basic.cpp
1. /home/mistar/documents/development/repos/dime/include/dime/../dime/constant.hpp:53:49: current parser token ';'
2. /home/mistar/documents/development/repos/dime/include/dime/../dime/constant.hpp:9:1: parsing namespace 'dime'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 libLLVM-16.so 0x00007f0290c1f503 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 67
1 libLLVM-16.so 0x00007f0290c1c7bf llvm::sys::RunSignalHandlers() + 47
2 libLLVM-16.so 0x00007f0290b08849
3 libc.so.6 0x00007f028f85c710
4 libclang-cpp.so.16 0x00007f0298c01e95 clang::desugarForDiagnostic(clang::ASTContext&, clang::QualType, bool&) + 245
5 libclang-cpp.so.16 0x00007f0298c02af9
6 libclang-cpp.so.16 0x00007f0298c03292 clang::FormatASTNodeDiagnosticArgument(clang::DiagnosticsEngine::ArgumentKind, long, llvm::StringRef, llvm::StringRef, llvm::ArrayRef<std::pair<clang::DiagnosticsEngine::ArgumentKind, long>>, llvm::SmallVectorImpl<char>&, void*, llvm::ArrayRef<long>) + 290
7 libclang-cpp.so.16 0x00007f02989d6cf1 clang::Diagnostic::FormatDiagnostic(char const*, char const*, llvm::SmallVectorImpl<char>&) const + 2401
8 libclang-cpp.so.16 0x00007f029a33d742 clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level, clang::Diagnostic const&) + 130
9 libclang-cpp.so.16 0x00007f02989d0164 clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 164
10 libclang-cpp.so.16 0x00007f02989d0428 clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 120
11 libclang-cpp.so.16 0x00007f02992716db clang::Sema::EmitCurrentDiagnostic(unsigned int) + 315
12 libclang-cpp.so.16 0x00007f0299279613 clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder() + 83
13 libclang-cpp.so.16 0x00007f0299887588 clang::Sema::FindInstantiatedDecl(clang::SourceLocation, clang::NamedDecl*, clang::MultiLevelTemplateArgumentList const&, bool) + 2232
14 libclang-cpp.so.16 0x00007f029986ee82
15 libclang-cpp.so.16 0x00007f0299871664
16 libclang-cpp.so.16 0x00007f029981f31a
17 libclang-cpp.so.16 0x00007f029986b345
18 libclang-cpp.so.16 0x00007f029986d7f9
19 libclang-cpp.so.16 0x00007f029986fa87
20 libclang-cpp.so.16 0x00007f0299871664
21 libclang-cpp.so.16 0x00007f029986e188
22 libclang-cpp.so.16 0x00007f029987267e
23 libclang-cpp.so.16 0x00007f029981f31a
24 libclang-cpp.so.16 0x00007f029aa13e53
25 libclang-cpp.so.16 0x00007f029ab9f108
26 libclang-cpp.so.16 0x00007f029978864d clang::Sema::DeclareImplicitDeductionGuides(clang::TemplateDecl*, clang::SourceLocation) + 973
27 libclang-cpp.so.16 0x00007f02996449c2
28 libclang-cpp.so.16 0x00007f0299644abd clang::Sema::LookupQualifiedName(clang::LookupResult&, clang::DeclContext*, bool) + 109
29 libclang-cpp.so.16 0x00007f02996070ef clang::Sema::DeduceTemplateSpecializationFromInitializer(clang::TypeSourceInfo*, clang::InitializedEntity const&, clang::InitializationKind const&, llvm::MutableArrayRef<clang::Expr*>) + 415
30 libclang-cpp.so.16 0x00007f029978e097 clang::Sema::CheckTemplateArgument(clang::NonTypeTemplateParmDecl*, clang::QualType, clang::Expr*, clang::TemplateArgument&, clang::TemplateArgument&, clang::Sema::CheckTemplateArgumentKind) + 3527
31 libclang-cpp.so.16 0x00007f0299793003 clang::Sema::CheckTemplateArgument(clang::NamedDecl*, clang::TemplateArgumentLoc&, clang::NamedDecl*, clang::SourceLocation, clang::SourceLocation, unsigned int, llvm::SmallVectorImpl<clang::TemplateArgument>&, llvm::SmallVectorImpl<clang::TemplateArgument>&, clang::Sema::CheckTemplateArgumentKind) + 579
32 libclang-cpp.so.16 0x00007f02998117e6
33 libclang-cpp.so.16 0x00007f0299849917
34 libclang-cpp.so.16 0x00007f029984a739
35 libclang-cpp.so.16 0x00007f0299246f51 clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) + 113
36 libclang-cpp.so.16 0x00007f0299812343 clang::Sema::DeduceTemplateArguments(clang::ClassTemplatePartialSpecializationDecl*, clang::TemplateArgumentList const&, clang::sema::TemplateDeductionInfo&) + 963
37 libclang-cpp.so.16 0x00007f029ab9c161
38 libclang-cpp.so.16 0x00007f02998eb083
39 libclang-cpp.so.16 0x00007f0299246f51 clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) + 113
40 libclang-cpp.so.16 0x00007f02998cf67a clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser*) + 2218
41 libclang-cpp.so.16 0x00007f029aa2e5c1
42 libclang-cpp.so.16 0x00007f0299584e86 clang::Sema::BuildCXXTypeConstructExpr(clang::TypeSourceInfo*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, bool) + 2006
43 libclang-cpp.so.16 0x00007f0299584fde clang::Sema::ActOnCXXTypeConstructExpr(clang::OpaquePtr<clang::QualType>, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, bool) + 126
44 libclang-cpp.so.16 0x00007f0298b45d08 clang::Parser::ParseCXXTypeConstructExpression(clang::DeclSpec const&) + 1352
45 libclang-cpp.so.16 0x00007f0298b35803 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) + 6659
46 libclang-cpp.so.16 0x00007f0298b35c7d clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) + 7805
47 libclang-cpp.so.16 0x00007f029aa0b8bd
48 libclang-cpp.so.16 0x00007f029aa0b966
49 libclang-cpp.so.16 0x00007f0298afa4d1 clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) + 481
50 libclang-cpp.so.16 0x00007f0298b924de clang::Parser::ParseSingleDeclarationAfterTemplate(clang::DeclaratorContext, clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&, clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) + 1390
51 libclang-cpp.so.16 0x00007f0298b93ce1 clang::Parser::ParseTemplateDeclarationOrSpecialization(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) + 993
52 libclang-cpp.so.16 0x00007f0298b93efb clang::Parser::ParseDeclarationStartingWithTemplate(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) + 171
53 libclang-cpp.so.16 0x00007f0298b0a51d clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, clang::SourceLocation*) + 589
54 libclang-cpp.so.16 0x00007f0298bb8684 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 996
55 libclang-cpp.so.16 0x00007f0298b19c8e clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 478
56 libclang-cpp.so.16 0x00007f0298b24f0a clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) + 2474
57 libclang-cpp.so.16 0x00007f0298b0a69c clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, clang::SourceLocation*) + 972
58 libclang-cpp.so.16 0x00007f0298bb8684 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 996
59 libclang-cpp.so.16 0x00007f0298bb9073 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) + 515
60 libclang-cpp.so.16 0x00007f0298aecf49 clang::ParseAST(clang::Sema&, bool, bool) + 601
61 libclang-cpp.so.16 0x00007f029a31e7c9 clang::FrontendAction::Execute() + 393
62 libclang-cpp.so.16 0x00007f029a2c0d2f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 399
63 libclang-cpp.so.16 0x00007f029a37bf02 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 450
64 clang++ 0x0000561290318a6f cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 3839
65 clang++ 0x000056129031cb10
66 libclang-cpp.so.16 0x00007f0299fec779
67 libLLVM-16.so 0x00007f0290b08c87 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 39
68 libclang-cpp.so.16 0x00007f0299ff30c4
69 libclang-cpp.so.16 0x00007f029a011431 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const + 161
70 libclang-cpp.so.16 0x00007f029a0117ed clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const + 253
71 libclang-cpp.so.16 0x00007f029a0155dc clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) + 412
72 clang++ 0x000056129031f99f clang_main(int, char**) + 10223
73 libc.so.6 0x00007f028f845cd0
74 libc.so.6 0x00007f028f845d8a __libc_start_main + 138
75 clang++ 0x0000561290310ed5 _start + 37
clang-16: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 16.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```
Seems frontend problem.
Preprocessed sources and run scripts for both full and minimal crashing example:
[minimal-crash.tar.gz](https://github.com/llvm/llvm-project/files/13057771/minimal-crash.tar.gz)
[full-crash.tar.gz](https://github.com/llvm/llvm-project/files/13057774/full-crash.tar.gz)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcW0tz3LaT_zTUBTVTBPg-6DAaaRJlLdsrqbLZvahAsDmDNUkwAClLOexn3wIJzpDzwjixU__8Xa6EQzbQD3T_uhuAqVJ8XQFcO8GNE9xe0bbZCHldctVQKcVVKrL362VBqzXCIWKSqg0o9HUDFUpbXmS8WqNaiv8F1jjeAm2aplaOt3DIyiGrNW8Kms6ZKPWPDciSVg5ZZbwETePeOu7CCV3zt_v51FD2BWVtWW8p3LnjJp-lWEtaIirXbQlVo5kgh6xaJR2ySrmel2kxHXLjkBs0u3fIaiNKcMiqV0YzFswMJqsMXqEQtf7pkJWEWqhBNLLiFSvaDHYv5nM0W6OZajLHu2U9D-KiGZS8mRXFa4lmv3Xs0SzjiqYFdG9nNVUKFJo93KLZwzNqQGluywf6BVa8AM1Sv3tJqeJsnvFOme6Z1fVcoNnDCl1MPc_QTFxOjmYM_RUjGWW2M_arhfVqfWfb756ZqFRDq2a-qbWDBJ7jLfxE-wJrpYSqQTWVCiRqxBeokEMix7vR_-1kI3-n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