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

    <tr>
        <th>Summary</th>
        <td>
            `misc-const-correctness` does not warn when using `auto` to declare local variables
        </td>
    </tr>

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

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

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

<pre>
    ```cpp
void foo() {
    bool a = true; // recommends adding const
    auto b = true; // no diagnostic emitted
}
```

When declaring a local variable with `const`, `misc-const-correctness` will never recommend adding `const`. I've tried for built-in types as well as user-defined types and can't under any circumstances get it to recommend adding `const` to an `auto` type.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8Us2K4zwQfBr50iQo7b_44MPMhMB3_2DPstRja5GloG4n5O0XO5nNsiwDxrKqKbmqVIbZj5GoV_W7qk-FWWRKuf-Ysuf_p2x4olwMyd171ejHYy8XpU9Kv12Td_CZksKjwg5U-_7AAQCGlAIYUOUJJC-kyndQeFZ4hkw2zTNFx2Cc83EEmyLLi2oWSTD8ixoTOG_GmFi8BZq9CLkHUbWn58eXzOd2e_-YKIIjG0xef2ggJGsCXE32ZggENy8TrNY2JY1W-LFuZ892t2E7m3ImK5GYVaPh5kOASFfKLz9fdv44Zw__KWyvBJI9rVllGBYfZOcjyP1CDIbhRiGs68KUd44-fST3NY0OrIkKW4ElOspg4h2sz3aZWUy0xDCSgBeQ9K2SdW7iiqzxbsD9QvtHPIXrS9eVnSmoPzRtU-uDbspi6t2RqK3bqj6Wpcau66jtqmNFn2hbxMEUvkeNpcZDjVhVWO4PzVCb4YBVW5XW6kpVmmbjwz6E67xPeSw880J9o9tjVwQzUOCte4iRbrANFeJaxdyvnN2wjKwqHTwLv04RL4H6b-_IJWKISeBmcoTbWoGFn7H8DiE9a0F_VYKLJYd-ErmwKt8e_Ru9TMuwt2lWeF6VPJfdJaefZEXhedPPCs-bv18BAAD__wfpEbk">