[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 16 06:21:10 PDT 2023


jhuber6 added a comment.

In D148444#4272036 <https://reviews.llvm.org/D148444#4272036>, @PiotrZSL wrote:

> Fix Linux build before committing & resolve all comments.

The log says that it failed because of the CMake version. I don't think I can fix that.



================
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]
----------------
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?


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