<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/65211>65211</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Clang-16 crashes when compiling Objective C project
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Frityet
      </td>
    </tr>
</table>

<pre>
    ```yaml
error: PLEASE submit a bug report to https://github.com/Homebrew/homebrew-core/issues and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/local/opt/llvm/bin/clang -c -pipe -DIBOutlet=__attribute__((iboutlet)) -DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName))) -DIBAction=void)__attribute__((ibaction) -Qunused-arguments -m64 -g -O0 -std=c2x -Icli/src -Ithor/src -Icommon/src -DPROJECT_DEBUG -framework Foundation -framework CoreFoundation -isystem /Users/frityet/.xmake/packages/o/objfw-local/2023.03.18/728a583f588646c9a69f12e4d6a3d9c6/include -isystem /usr/local/Cellar/openssl@3/3.1.2/include -isystem /Users/frityet/.xmake/packages/l/lua/v5.4.4/5aa0409c6a5f4e0f81e49239bca2d585/include/lua -I/Users/frityet/.xmake/packages/o/objfw-local/2023.03.18/728a583f588646c9a69f12e4d6a3d9c6/include -fexceptions -fobjc-exceptions -funwind-tables -fconstant-string-class=OFConstantString -Xclang -fno-constant-cfstrings -fblocks -fobjc-arc -fobjc-arc-exceptions -Wall -Wextra -Werror -Wnull-dereference -Wnull-conversion -Wnullability-completeness -Wnullable-to-nonnull-conversion -Wanon-enum-enum-conversion -Wassign-enum -Wenum-conversion -Wenum-enum-conversion -Wno-missing-braces -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -MMD -MF /var/folders/ps/cqv_3ytx5nn59k5q3k17th500000gn/T/.xmake501/230902/_59D3153FD31D481081412F46BD60A040 -fdiagnostics-color=always -o build/.objs/ThorCLI/macosx/x86_64/debug/cli/src/main.m.o cli/src/main.m
1. cli/src/main.m:173:1 <Spelling=/Users/frityet/.xmake/packages/o/objfw-local/2023.03.18/728a583f588646c9a69f12e4d6a3d9c6/include/ObjFW/OFApplication.h:68:2>: current parser token 'int'
2.      cli/src/main.m:16:1: LLVM IR generation of declaration 'ThorCLI::listWithArguments:'
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.dylib 0x00000001213192bb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  libLLVM.dylib            0x0000000121318657 llvm::sys::CleanupOnSignal(unsigned long) + 199
2  libLLVM.dylib 0x0000000125937bb5 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) + 53
3  libLLVM.dylib            0x0000000125937c7e CrashRecoverySignalHandler(int) + 94
4  libsystem_platform.dylib 0x00007ff8082085ed _sigtramp + 29
5  libsystem_platform.dylib 0x01007ff52a2550e8 _sigtramp + 72057581723765528
6  libclang-cpp.dylib 0x0000000115375ac9 clang::CodeGen::CodeGenFunction::callCStructCopyConstructor(clang::CodeGen::LValue, clang::CodeGen::LValue) + 281
7  libclang-cpp.dylib 0x0000000115323854 (anonymous namespace)::AggExprEmitter::EmitFinalDestCopy(clang::QualType, clang::CodeGen::LValue const&, (anonymous namespace)::AggExprEmitter::ExprValueKind) + 1076
8  libclang-cpp.dylib 0x00000001153268fc (anonymous namespace)::AggExprEmitter::VisitCXXParenListOrInitListExpr(clang::Expr*, llvm::ArrayRef<clang::Expr*>, clang::FieldDecl*, clang::Expr*) + 9084
9 libclang-cpp.dylib       0x000000011531a0de (anonymous namespace)::AggExprEmitter::Visit(clang::Expr*) + 2414
10 libclang-cpp.dylib       0x0000000115319506 clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*, clang::CodeGen::AggValueSlot) + 342
11 libclang-cpp.dylib 0x00000001152eeb35 clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(clang::Expr const*, clang::CodeGen::Address, clang::Qualifiers, bool) + 805
12 libclang-cpp.dylib       0x000000011530386b clang::CodeGen::CodeGenFunction::EmitCompoundLiteralLValue(clang::CompoundLiteralExpr const*) + 491
13 libclang-cpp.dylib       0x00000001152ed42d clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) + 925
14 libclang-cpp.dylib       0x00000001152f9077 clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay(clang::Expr const*, clang::CodeGen::LValueBaseInfo*, clang::CodeGen::TBAAAccessInfo*) + 55
15 libclang-cpp.dylib       0x00000001153680fd (anonymous namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) + 1981
16 libclang-cpp.dylib       0x0000000115348c54 (anonymous namespace)::ScalarExprEmitter::Visit(clang::Expr*) + 548
17 libclang-cpp.dylib       0x00000001152ee547 clang::CodeGen::CodeGenFunction::EmitAnyExprToTemp(clang::Expr const*) + 199
18 libclang-cpp.dylib       0x000000011527a99f clang::CodeGen::CodeGenFunction::EmitCallArg(clang::CodeGen::CallArgList&, clang::Expr const*, clang::QualType) + 1471
19 libclang-cpp.dylib 0x0000000115279a40 clang::CodeGen::CodeGenFunction::EmitCallArgs(clang::CodeGen::CallArgList&, clang::CodeGen::CodeGenFunction::PrototypeWrapper, llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr const* const, clang::Stmt const* const>>, clang::CodeGen::CodeGenFunction::AbstractCallee, unsigned int, clang::CodeGen::CodeGenFunction::EvaluationOrder) + 2624
20 libclang-cpp.dylib       0x0000000115316b0c clang::CodeGen::CodeGenFunction::EmitCall(clang::QualType, clang::CodeGen::CGCallee const&, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, llvm::Value*) + 2892
21 libclang-cpp.dylib       0x00000001153136db clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*, clang::CodeGen::ReturnValueSlot) + 459
22 libclang-cpp.dylib 0x000000011534d4a2 (anonymous namespace)::ScalarExprEmitter::Visit(clang::Expr*) + 19058
23 libclang-cpp.dylib       0x000000011539b2ae (anonymous namespace)::ARCExprEmitter<(anonymous namespace)::ARCRetainExprEmitter, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*>>>>::visit(clang::Expr const*) + 670
24 libclang-cpp.dylib       0x000000011539b1ef (anonymous namespace)::ARCExprEmitter<(anonymous namespace)::ARCRetainExprEmitter, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*>>>>::visit(clang::Expr const*) + 479
25 libclang-cpp.dylib       0x000000011539685b clang::CodeGen::CodeGenFunction::EmitARCRetainScalarExpr(clang::Expr const*) + 155
26 libclang-cpp.dylib       0x00000001152cf648 clang::CodeGen::CodeGenFunction::EmitScalarInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 1560
27 libclang-cpp.dylib       0x00000001152cf10e clang::CodeGen::CodeGenFunction::EmitScalarInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 222
28 libclang-cpp.dylib       0x00000001152d1fff clang::CodeGen::CodeGenFunction::EmitAutoVarInit(clang::CodeGen::CodeGenFunction::AutoVarEmission const&) + 2159
29 libclang-cpp.dylib       0x00000001152cd329 clang::CodeGen::CodeGenFunction::EmitVarDecl(clang::VarDecl const&) + 89
30 libclang-cpp.dylib       0x00000001152ccdfa clang::CodeGen::CodeGenFunction::EmitDecl(clang::Decl const&) + 42
31 libclang-cpp.dylib       0x0000000115472dba clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) + 554
32 libclang-cpp.dylib 0x0000000115481f76 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) + 150
33 libclang-cpp.dylib 0x0000000115387fff clang::CodeGen::CodeGenFunction::GenerateObjCMethod(clang::ObjCMethodDecl const*) + 271
34 libclang-cpp.dylib       0x000000011550886a clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 618
35 libclang-cpp.dylib       0x0000000115587493 (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 115
36 libclang-cpp.dylib       0x00000001154daeb0 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 176
37 libclang-cpp.dylib       0x0000000113b6b033 clang::ParseAST(clang::Sema&, bool, bool) + 483
38 libclang-cpp.dylib       0x0000000115c99f3d clang::FrontendAction::Execute() + 77
39 libclang-cpp.dylib 0x0000000115c08a48 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 680
40 libclang-cpp.dylib       0x0000000115ceca58 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 536
41 clang-16                 0x000000010ee68766 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 2534
42 clang-16 0x000000010ee65a6c ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) + 444
43 libclang-cpp.dylib       0x00000001158000c7 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const::$_0>(long) + 23
44 libLLVM.dylib            0x0000000121233477 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 119
45 libclang-cpp.dylib       0x00000001157ffa87 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const + 359
46 libclang-cpp.dylib 0x00000001157b40eb clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const + 1051
47 libclang-cpp.dylib 0x00000001157de3ef clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&) + 351
48 clang-16                 0x000000010ee643d1 clang_main(int, char**) + 9937
49 dyld                     0x00007ff807e8141f start + 1903
clang-16: error: clang frontend command failed with exit code 139 (use -v to see invocation)
Homebrew clang version 16.0.6
Target: x86_64-apple-darwin22.5.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
clang-16: note: diagnostic msg: 
```

preprocessed source and run script:
[crash.zip](https://github.com/llvm/llvm-project/files/12504494/crash.zip)

I could find no crash backtrace.


Full source code available [here](https://github.com/Frityet/Thor)




</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsW91T47qS_2vMi8opW_LnAw8hIXPYZRbuwJ05uy8pWW4HDbLkK8tA7l-_JX8kcQhg2NqvqpM6JxNLcuvXrVb3z3JD65pvJMC5E1444fKMNuZB6fOV5mYL5ixT-fbcibzuvy0theMtHW8OWivtkDm6vb6c312iuslKbhBFWbNBGiqlDTIKPRhT1Q6ZO3jl4NWGm4cmmzFVOnj1hyoh0_Ds4NVD_9NlSoODV7yuG6gRlTnikokmB2QeADFN6weUUfZoNGXg4AWqNFRaMahryFGtGt012ztpXSvGqYEc6UaimmlemVmH_s5Q9ojypqwstrbJm6H2c6vVRtMSUb1pSpDGokcOXjW1dvBKKEaFg1eqMvZKPFlNMi4dvGKCyg1yGXIrXgFyl1cXN40RYByyXK-pMZpnjYH12sGJgxOeqa4Xpw5OD4YvlBDADFfSwclC0Lr-N1qCHfauHPbmbfsJ5l0_WT4pnjs4PSmO9kJS5P6tkU0NubuzBXLLKEDuBrk3HnJrkztkyfALcq-Y4A5e1Zoh98o60O6CqbK04rrL5e2Pm3-5XNyvl5cXf_-G3ELTEp6VfkQr1cic2qkPWxdKw2EPr7e1gdIuyN9r0LWDV0XnqQ5ezV5K-mj9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