[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas
Piotr Zegar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 16 06:31:00 PDT 2023
PiotrZSL added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/llvmlibc/inline-function-decl.hpp:66
+// CHECK-MESSAGES-NOT: :[[@LINE+3]]:3: warning: 'operator void (*)()' must be tagged with the LIBC_INLINE macro; the macro should be placed at the beginning of the declaration [llvmlibc-inline-function-decl]
+// CHECK-MESSAGES-NOT: :[[@LINE+2]]:3: warning: '~(lambda at [[FILENAME:.+]])' must be tagged with the LIBC_INLINE macro; the macro should be placed at the beginning of the declaration [llvmlibc-inline-function-decl]
+// CHECK-MESSAGES-NOT: :[[@LINE+1]]:6: warning: 'operator()' must be tagged with the LIBC_INLINE macro; the macro should be placed at the beginning of the declaration [llvmlibc-inline-function-decl]
----------------
jhuber6 wrote:
> PiotrZSL wrote:
> > NOTE: If this warning were printed then we got other issue in this check.
> > Implicit functions are checked, would be good to exclude them:
> > `functionDecl(unless(isImplicit()))`.
> That was printed without this patch. Are you saying we should have a separate check for these types of functions?
I'm just telling that this shouldn't be printed in first place because they are implicit, so there is no place to add macro.
For me this is another bug in this check that should be addressed (probably in separate patch).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148444/new/
https://reviews.llvm.org/D148444
More information about the cfe-commits
mailing list