[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 2 13:36:30 PDT 2023
================
@@ -79,6 +79,10 @@ void InlineFunctionDeclCheck::check(const MatchFinder::MatchResult &Result) {
if (MethodDecl->getParent()->isLambda())
return;
+ // Ignore implicit functions (e.g. implicit constructors or destructors)
+ if (FuncDecl->isImplicit())
----------------
PiotrZSL wrote:
Instead using isImplicit better just add:
```
std::optional<TraversalKind> getCheckTraversalKind() const override {
return TK_IgnoreUnlessSpelledInSource;
}
```
to a header file of this check.
https://github.com/llvm/llvm-project/pull/71095
More information about the cfe-commits
mailing list