<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56236>56236</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
error or warning on multi-line expressions are truncated
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jonathanpoelen
</td>
</tr>
</table>
<pre>
```cpp
int main() {
char const* b = ""
+ "";
}
```
```console
$ clang++ test.cpp
test.cpp:3:17: error: invalid operands to binary expression ('const char [1]' and 'const char [1]')
+ "";
^ ~~
1 error generated.
```
Lines 2 and 3 should be displayed in the message, as does gcc:
```console
$ g++ test.cpp
test.cpp: In function ‘int main()’:
test.cpp:3:17: error: invalid operands of types ‘const char [1]’ and ‘const char [1]’ to binary ‘operator+’
2 | char const* b = ""
| ~~
| |
| const char [1]
3 | + "";
| ^ ~~
| |
| const char [1]
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1U9tuozAQ_RrzMmpEzP2Bh7RppZX2JwwM4MqxkW3azd_vAAltk3Q3-7BoANsznjlnLpVpjiVLw0XqYWDhnoU7qT0chNSM54wXwLLH5Ryg7oWF2mjnGd9BBSzaA-N8kpPF14fxx7M-Ojlh2f60OMe92E7ujcLTKY-hVkJ35Gly5tH5zQp03UW7iN5tRh9Aa42dFlK_CSUbMANaoRsH3kAltbBHwF-DReek0TCTzGZOCz2WPG5ZsqdDoFvwnZIyczfnK5PkmbL6PMms3y6goUNNUD02m9spmr8_pUYHfAYXgevNqBqoEBrpBiWO2BBx8D3CgRiKDhl_AuGgMXSrq2vKzGdv36f9MuVwlXP4oaEdde3nPD5zloesyL92z_m4WOP-Y9FMC_44EPY1wI1ynIMsFbvH8KMXVvM5pCcYxHtFvdaPU8We4N4RWGyv6v6p5n-2e_q70Q12653o5p1vO_Om8UWP_je8awcGTRk1RVSIwEuvsFxmguRdWC11B9Rlh1F5-aBoBD7NsANhEbylVpyGJxitKnvvBzf1HH8h6aTvx2pTmwNtlHo7_x4Ga16xplK-SOdGdLRIUh6lQV_miE2WxrzlbZTmcZimRU2rLEnyrA1FFChRoXIlkaGManyH2cWU3WQfyJKHnIcpJ29xGPNNmBciakUR5-02FvWWxSHSmKjNhGNjbBfYcoZUjZ0jpZLOuw-lIKadRpzDkX8x-t7Y8tVo4XuhB4MKdTAjKGcGvwEx8o1Q">