[PATCH] D125209: [clang-tidy] modernize-deprecated-headers check should respect extern "C" blocks

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 11 11:25:28 PDT 2022


steakhal updated this revision to Diff 428724.
steakhal added a comment.

- Ignore `extern "C++"` blocks; also added a test for this.
- Also ignore `LinkageSpecDecl`s without braces.
- Clear the `IncludesToBeProcessed` list at the end of each translation unit.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125209/new/

https://reviews.llvm.org/D125209

Files:
  clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
  clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.h
  clang-tools-extra/test/clang-tidy/checkers/Inputs/modernize-deprecated-headers/mylib.h
  clang-tools-extra/test/clang-tidy/checkers/modernize-deprecated-headers-extern-c.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125209.428724.patch
Type: text/x-patch
Size: 11668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220511/1f7e3731/attachment-0001.bin>


More information about the cfe-commits mailing list