[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-03 Thread via cfe-commits
https://github.com/michaelrj-google closed https://github.com/llvm/llvm-project/pull/71095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread via cfe-commits
https://github.com/michaelrj-google updated https://github.com/llvm/llvm-project/pull/71095 >From 0ca1191c2235881493a82f040c437d8da8a82862 Mon Sep 17 00:00:00 2001 From: Michael Jones Date: Thu, 2 Nov 2023 12:23:34 -0700 Subject: [PATCH 1/3] [clang-tidy][libc] Ignore implicit function inline

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread Piotr Zegar via cfe-commits
@@ -304,6 +304,10 @@ Changes in existing checks customizable namespace. This further allows for testing the libc when the system-libc is also LLVM's libc. +- Improved :doc:`llvmlibc-inline-function-decl + ` to properly ignore implicit PiotrZSL wrote:

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread Piotr Zegar via cfe-commits
@@ -79,6 +79,10 @@ void InlineFunctionDeclCheck::check(const MatchFinder::MatchResult ) { if (MethodDecl->getParent()->isLambda()) return; + // Ignore functions that have been deleted. + if (FuncDecl->isDeleted()) PiotrZSL wrote: Instead of this

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread via cfe-commits
@@ -3,6 +3,7 @@ llvmlibc-inline-function-decl = -Checks that all implicit and explicit inline functions in header files are -tagged with the ``LIBC_INLINE`` macro. See the `libc style guide -`_ for more

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread via cfe-commits
https://github.com/michaelrj-google updated https://github.com/llvm/llvm-project/pull/71095 >From 0ca1191c2235881493a82f040c437d8da8a82862 Mon Sep 17 00:00:00 2001 From: Michael Jones Date: Thu, 2 Nov 2023 12:23:34 -0700 Subject: [PATCH 1/2] [clang-tidy][libc] Ignore implicit function inline

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread via cfe-commits
@@ -79,6 +79,10 @@ void InlineFunctionDeclCheck::check(const MatchFinder::MatchResult ) { if (MethodDecl->getParent()->isLambda()) return; + // Ignore implicit functions (e.g. implicit constructors or destructors) + if (FuncDecl->isImplicit())

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread Piotr Zegar via cfe-commits
@@ -3,6 +3,7 @@ llvmlibc-inline-function-decl = -Checks that all implicit and explicit inline functions in header files are -tagged with the ``LIBC_INLINE`` macro. See the `libc style guide -`_ for more

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, Consider also adding tests for default and deleted constructors or assign operators, I think that they also could generate false-positive. https://github.com/llvm/llvm-project/pull/71095

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread Piotr Zegar via cfe-commits
@@ -79,6 +79,10 @@ void InlineFunctionDeclCheck::check(const MatchFinder::MatchResult ) { if (MethodDecl->getParent()->isLambda()) return; + // Ignore implicit functions (e.g. implicit constructors or destructors) + if (FuncDecl->isImplicit())

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (michaelrj-google) Changes This patch adjusts the inline function decl check for LLVM libc to ignore implicit functions. For the moment the plan is to ignore these and mark the class with a macro so that it can be given the

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread via cfe-commits
https://github.com/michaelrj-google created https://github.com/llvm/llvm-project/pull/71095 This patch adjusts the inline function decl check for LLVM libc to ignore implicit functions. For the moment the plan is to ignore these and mark the class with a macro so that it can be given the