[Sema] Tweak diagnostic logic so suppress-in-header logic works in tools too.
Certain idioms are ignored by -Wunused in header files only. The current "is a header" check assumes that if headers are the main file, we're building a PCH or a module or something. However in tools we may be parsing the header in its own right, but still want to treat it as a header. Fixes https://github.com/clangd/vscode-clangd/issues/360 Differential Revision: https://reviews.llvm.org/D129642
Loading
Please sign in to comment