[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
Tue May 17 05:57:28 PDT 2022


steakhal updated this revision to Diff 430012.
steakhal added a comment.
This revision is now accepted and ready to land.

- Copy the `mylib.h` under the build directory to have deterministic relative order to the LIT test file.
- Use `SourceManager::isBeforeInTranslationUnit` instead of the fancy decomposed decl logarithmic search.
- Add a test for including a system header containing a deprecated include.
- Add `REQUIRES: system-linux` clause to the test.


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/docs/ReleaseNotes.rst
  clang-tools-extra/test/clang-tidy/checkers/Inputs/modernize-deprecated-headers/mylib.h
  clang-tools-extra/test/clang-tidy/checkers/Inputs/modernize-deprecated-headers/mysystemlib.h
  clang-tools-extra/test/clang-tidy/checkers/modernize-deprecated-headers-extern-c.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125209.430012.patch
Type: text/x-patch
Size: 12876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220517/42496ca5/attachment.bin>


More information about the cfe-commits mailing list