[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
Fri May 13 09:17:59 PDT 2022
steakhal reopened this revision.
steakhal added a comment.
This revision is now accepted and ready to land.
It seems like we cannot use the sorting I did. The warning within the `mylib.h` header will have a different FileID than the original TU. Consequently, the `upper_bound()` `lower_bound()` range will be empty even if the `extern "C" { ... }` block.
I might need to fallback to the `isBeforeInTranslationUnit` or something like that. But I fear, if that's the case, the complexity will be `O(n * m)` for `n` extern "C" block and `m` includes. We will see.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125209/new/
https://reviews.llvm.org/D125209
More information about the cfe-commits
mailing list