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

    <tr>
        <th>Summary</th>
        <td>
            a lot of `Ref location outside file` message print out when dumping a HTML report
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-include-cleaner
      </td>
    </tr>

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

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

<pre>
    running `clang-include-cleaner` to dump html report on `SemaExpr.cpp`, it prints a lot of the error messages because of the def include pattern is used in the main file.

```
Ref location outside file! clang::BuiltinType at /workspace/llvm-project/clang/include/clang/AST/BuiltinTypes.def:246:1 <Spelling=llvm-project/clang/lib/Sema/SemaExpr.cpp:21073:44>
```

This is a FIXME in https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/include-cleaner/lib/HTMLReport.cpp#L224. Options: 
- remove the `llvm::errs` statement directly
- use the spelling loc as the ref loc (this implies that a lot of refs are bind to the same location, which doesn't seem useful)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVM2OozgQfhpzKQWZgkA4cGCmG-1KM1ppOoe9GiiCd4yNbNM_b7-yQ9ItbfdhpchR7FT5-ysL5-RFEzXs-I0dHxKx-dnYZja_SeqkN-NbYzetpb4AK_mghL4cpB7UNtJhUCQ0WVZy8AbGbVlh9osCS6uxHowOJU-0iMfX1abDurKSM_wO0sNqpfYOBCjjwUzgZwKy1lhYyDlxIQc9DWJzdDsdaYL9YliF92Q1SAeboxGkjn9ZhNQwSUUp4w-Mt_ta8v0Tf_6iCZQZhJdGg9m8kyPFIoYZRH4sb1neftuk8lKf31YC4YFh92Lsb7eKgRh2Sj0vh9Waf2jwDLtrHXY7wA877dOZYfehmUtHmljeYlGyvM2A5d-fVlJKhosfvuirZM-wC1LuX3dF8xYzXuUsb4uC5Y-fUr6u51m6oJiA7s-_fz4G0WbvVxfoYsewu0g_b306mGUn-F-evTIBSBD6hu7gjVHuQK_eincF7tm4Yf_j_PPHr5iLCBvzH4hFCn-twYeAAa4oD2BpMc8UDWUljziiIWStC1FzXnhaSHsYpaXBq7dbZUhLKHO7nsFnEC7u2avtwPDkoxDLqiSFM-HfY2hpciAsQS_1GEId24mF7pEJ-X2Z5TDDaMhphpUHR7SEy6dNMayvaJKxycc6r0VCTVZW_FiXxxMmczPx-iTysqiGvuA9ZX0xHfFYVeXEqwFPWSIb5IgZ8jor8jKrU-qnkmMxYDXlI2bICk6LkCoN2qTGXhLp3EbNsS4wS5ToSbk4zoifzytimHTbRHP77eJYwZV03r139NIrau66sJJ_PTclvw3tdazDKbzMpOOTEHwQEOzf34Vks6r538mLFB3DLrL8NwAA__-474hO">