[all-commits] [llvm/llvm-project] ac3178: [Sema] Tweak diagnostic logic so suppress-in-heade...
Sam McCall via All-commits
all-commits at lists.llvm.org
Fri Aug 19 06:19:53 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ac31781759889226711b801c3833fea280fdb7aa
https://github.com/llvm/llvm-project/commit/ac31781759889226711b801c3833fea280fdb7aa
Author: Sam McCall <sam.mccall at gmail.com>
Date: 2022-08-19 (Fri, 19 Aug 2022)
Changed paths:
M clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
M clang/lib/Sema/SemaDecl.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list