[PATCH] D144347: [clang-tidy] Add readability-forward-usage check
Piotr Zegar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 31 14:35:39 PDT 2023
PiotrZSL marked an inline comment as done.
PiotrZSL added a comment.
I will leave this review open for 1 more week, in case someone have some comments, and by someone I mean you @carlosgalvezp.
================
Comment at: clang-tools-extra/clang-tidy/readability/ForwardUsageCheck.cpp:98
+ callExpr(
+ unless(isExpansionInSystemHeader()), argumentCountIs(1U),
+ IgnoreDependentExpresions
----------------
ccotter wrote:
> Curious, why have `isExpansionInSystemHeader` here, rather than rely on the `system-headers` command line option. Is that a matter of performance (this tool is not likely to apply for system headers)?
isExpansionInSystemHeader works on check level, when --system-headers on diagnostic level. This mean that check will be executed, and warning will be excluded during call to diag.
For some checks this can be expensive.
Read more here: https://discourse.llvm.org/t/rfc-exclude-issues-from-system-headers-as-early-as-posible/68483
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144347/new/
https://reviews.llvm.org/D144347
More information about the cfe-commits
mailing list