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

    <tr>
        <th>Summary</th>
        <td>
            Add option to set default header language
        </td>
    </tr>

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

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

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

<pre>
    When `.clang-format` includes the setting `Language: C`, `clang-format` do not format header files (.h) and displays the message `Configuration file(s) do(es) not support C++`.

Adding `// clang-format Language: C` to the beginning of the header files solves the problem and the headers are formatted as expected, but this should be considered a workaround.

There should be an option for telling `clang-format` to treat all header files as C in order to prevent having to add the comment to all header files. In addition, the default language for header files should match the language set in the `.clang-format` file.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsU01vpDgU_DXm8hQE5qs5cOj0qqWV9rjSnh_4NXjH2Mh-7kz-_cg0mSStkZBA5arnqsLGEPRsiQbRvIrmrwwjL84Pzk568xqtzkan3of_FrIg2iKfDNr55eb8iizaArSdTFQUgBeCQMzazon4D9o54kyiOsNFtIWQlwQ_y5UD6xgeACyEijzctKEAQp7yRcge0CpQOmwG3x_brBQCzpTmXZy96Tl6ZO3sLhTyFJJKOSFPtH-mHULcNucZLkK-pqctclGcRXE-K3VYFvIq5BW-WoTnGMButzDSrK1NQnfbgW_WgzP3o5LNu9HQuof45AVAT0dqJgUYgH5uNDGpVNQYGXjRAcLiolEwEkzOBq3IJzK8Of8DvYtWHSH-XcjTFzZacNujEueByZgj43P_KY4nZEBjvmfAABfQFpxPGDvYPN3JMix4T8PYAapHpsmta1pJ0NOYHP62iaeTmRQt8RXdMBoGc5S7m_xe4CPJijwtu-Q3NRAnVwn703FM8jxTQ6X6qseMhrKrm152bVlmyyAJ27Fr6qYrilPflycl63pUsr2NJVWqyfQgC9kUtezLsqmqMqe-65HqqW-6lkrsRF3QitrkxtzX3Pk50yFEGsqq63qZGRzJhP0uSWnpDfZVIWW6Wn5IopcxzkHUhdGBw-cY1mxoOCv18ePY7Vk_ujrq-eghi94MC_MWRHV-HNxZ8xLHfHKrkNc093i9bN79TxMLed3dBCGvh937IH8FAAD__6r_Vig">