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

    <tr>
        <th>Summary</th>
        <td>
            Missing diagnostics: `)` preprocessing token that terminates the invocation does not exist
        </td>
    </tr>

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

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

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

<pre>
    Consider this code:
```
/* h2.h */
#define F()
F(

/* t10.c */
#include "h2.h"
)
int x; /* fix for "warning: ISO C requires a translation unit to contain at least one declaration" */
```
Invocation:
```
$ clang t10.c -std=c11 -pedantic -Wall -Wextra -c
```
Expected diagnostics:
```
`)` preprocessing token that terminates the invocation does not exist
```
Actual diagnostics:
```
<nothing>
```

Relevant quotes from C11:

5.1.1.2 Translation phases, 1:
> A `#include` preprocessing directive causes the named header or source file to be processed from phase 1 through phase 4, recursively.

6.10.3 Macro replacement, 4:
> There shall exist a `)` preprocessing token that terminates the invocation.

So, the source file `h2.h` processed from phase 1 through phase 4, and on phase 4 there is no matching `)` preprocessing token. This is violation of constraint 6.10.3/4. Conforming implementation shall produce at least one diagnostic message.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylVE1v2zAM_TX2hajh78YHH9K0BXYYBqwFdlZk2tYmS64kZ9m_H6U4bbJ1w4AhjmxJ5NPjI6m97n60O62s6NCAG4UFrjuMim2U3kfpNqrT9TlN88co38KYJyPQh5-u60WHvVAItL-J8ua0HCYng0t3l6UJ_9VfKC6XDmk59_D0Om-tYEI5OEbFHawovThCr413-M6MEmog1vDh6RPswODLIgxaYOAMU1YyJ7SCRQkHTlOIyjGhgDmQyKwDTcw75JKZYEiQ1_SuVfigDpqfDP-oUwmEpoY11hvruqi451kGNzN2TDlBi1-YlDTikTjCDX8X6eE4I3fYQSfYoLQlR_vHU-mD1KpTmA3ORnO0VngO-hsqSi6F69BMQjFH0rgRQbxGAp2mNaUd4FFY9y7-lruFyX9iUuwIagw5eXjfIoyfUeKB1ICXRXtOvdET7LLsDTeMVZLRL4fni1zOI7Noo3wHF9bFA2whyHCup9_V6KgwuBMHBM4Wuwqh2EQaj8h8G1BRWb0YjlRjEn3B7BFWBLIKJMPxkJGz0cswrvPS8yH4xVg6QP5ILqOoE6qFAj4ybjQZzZJxnFA571NexfA8okGwo6-PkA6q4_9J7hWNJ-0P9AaXQRJwaLuA_6-RMtXBORVQekyiLXwZwcQc9_n_O--EQiV7eg5Cr4nVve9PSz3hO_4kGnVimQDdU9Twk_cW0yyDeCefk1SE3i0U0HVbv1YrTHQ0G3BVI8Y2q6umvL3Nyjzu2qJriobFTjiJ7UdxLpbLWv-vJPzSYfFiZDs6N4cm8lfa4yDcuOwTrieaSHk4v27opK9UszQlWouv-seq3jRpPLa835RVxjZVk6ZN3fc1y1nPGNZpw8uyuo0l26O0bVTd0a2m8DsECH-9VvexaPM0z9MNDVlF_4Qh3_RlRor0ddGUdVSmODEhE88j0WaITRso7ZfB0qakSOzbJiM5BoUYjiN8trhRm3aetMmKOJzcBuY_ATjVAAg">