<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62054>62054</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
llvm_unreachable when processing comment & line continuation
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang,
clang:frontend,
crash
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
rupprecht
</td>
</tr>
</table>
<pre>
Crash when processing an "almost trailing comment" line:
https://godbolt.org/z/ehPM8f1ob
```
/*<*\
/
```
->
```
<source>:1:5: warning: escaped newline between */ characters at block comment end [-Wcomment]
/*<*\
^
if this is an almost Doxygen comment, it should be ordinary
UNREACHABLE executed at /root/llvm-project/clang/lib/Sema/Sema.cpp:2405!
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: /opt/compiler-explorer/clang-assertions-trunk/bin/clang++ -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics <source>
1. <unknown> parser at unknown location
#0 0x0000562be67b783f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3c6283f)
#1 0x0000562be67b557c llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3c6057c)
#2 0x0000562be67028c8 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#3 0x00007f668966b420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007f668913800b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
#5 0x00007f6689117859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
#6 0x0000562be670dbae (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3bb8bae)
#7 0x0000562be900ed4e clang::Sema::ActOnComment(clang::SourceRange) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x64b9d4e)
#8 0x0000562be8eaf494 (anonymous namespace)::ActionCommentHandler::HandleComment(clang::Preprocessor&, clang::SourceRange) Parser.cpp:0:0
#9 0x0000562bea9ba487 clang::Preprocessor::HandleComment(clang::Token&, clang::SourceRange) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x7e65487)
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0Vktv2zAS_jX0ZSCDoh6WDj44Toweutug6WKPwYgaS9xQpEBSjbO_fkFZebhNH1i0QCKL1Gi-b74ZDQe9V50h2rLiihXXK5xCb93WTePoSPZh1dj2abt36Ht47MnA6Kwk75XpAA0wIVAP1gcIDpWOu9IOA5nAhACtDLFsx_g148u1D2H0cU8cmDh0tm2sDmvrOiYO_2XiQP3tP6pjapu3L7GSL3_nZXx3x7J9vBb71813jedrwrKbn3nM9t5OTlI0y3Ypy3YFy3bwiM4o08Vb8hJHasHQYwwLGgqPRFGBCA2yR4cykPOAARpt5cOzEkCmBVZcJf9-lqa4_kkgAACsWNiqI4ReeVA-qr1IfW1PTx2ZV6X3oAL43k66hYbAulYZdE9nF__65-eb3f7D7urjDdCJ5BSojRyZODhrAxMHrb8Oyejsf0jGpdRoYjq0apg43NGAy89ajiPLdiLnBRPp2fvtx5vd3Q34qRlUAIRm6sDRaF2AYOGbbKvQT81a2mEB_R5beT-Rj4KiaUEZqaeWIPQEci7BBuVDcCgpBj06WqqRWljyJ_bzm-i9lQpjqG4y4KVTY1ifKd8FlA_QTsP4Upt8zXh962zncAB03RR1jcSjSnacVbHDqDS5hE6jto7cs1IJek8uKGt8EtxkHpg4NMq8CnnFxBUkXfuI7pjkkHSQ2OgXxzF6n8I4hbWHZIhaQJKcqjJBPyT-yQQ8sexamUAakjtIkk7KJFirZY_KsOz6p_SisTc4-t4GSI7SauuSVmFnrA9KekiOxiazsBfbF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