[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-02-12 Thread Siva Chandra via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb7b28c6cfe04: [clang-tidy][libc] Add an inline function checker for the libc project. (authored by sivachandra). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-02-06 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp accepted this revision. carlosgalvezp added a comment. This revision is now accepted and ready to land. LGTM, thanks for the contribution! Please wait a few days for other reviewers to have a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-02-06 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra updated this revision to Diff 495265. sivachandra marked 14 inline comments as done. sivachandra added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142592/new/ https://reviews.llvm.org/D142592 Files:

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-02-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/LLVMLibcTidyModule.cpp:28 +CheckFactories.registerCheck( +"llvmlibc-inline-function-decl-check"); CheckFactories.registerCheck( Remove

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-02-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/llvmlibc/inline-function-decl-check.rst:8 +tagged with the ``LIBC_INLINE`` macro. See the `libc style guide +`_ for more information about this

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-02-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp:27 + // Consider only explicitly or implicitly inline functions. + if (!FuncDecl->isInlined()) +return; Check if FuncDecl is not a nullptr

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-27 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra added a comment. Limit the description in the release notes to one sentence. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142592/new/ https://reviews.llvm.org/D142592 ___ cfe-commits

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-27 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra updated this revision to Diff 492661. sivachandra marked an inline comment as done. sivachandra added a comment. Limit the description in the release notes to one sentence. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142592/new/

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp:20 +void InlineFunctionDeclCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher(decl(functionDecl()).bind("func_decl"), this); +}

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:104 +Checks that all implicit and explicit inline functions in header files are +tagged with the ``LIBC_INLINE`` macro. See the `libc style guide +`_

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra updated this revision to Diff 492597. sivachandra added a comment. Update release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142592/new/ https://reviews.llvm.org/D142592 Files:

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra updated this revision to Diff 492596. sivachandra added a comment. Use the HeaderFileExtensions pattern to match constructs in header files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142592/new/ https://reviews.llvm.org/D142592

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/llvmlibc/inline-function-decl.cpp:18-19 + +// CHECK-MESSAGES: warning: 'addll' must be tagged with the LIBC_INLINE macro +// CHECK-MESSAGES: warning: 'addul' must be tagged with the

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Piotr Zegar via Phabricator via cfe-commits
ClockMan added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp:20 +void InlineFunctionDeclCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher(decl(functionDecl()).bind("func_decl"), this); +}

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp:20 +void InlineFunctionDeclCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher(decl(functionDecl()).bind("func_decl"), this); +}

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Piotr Zegar via Phabricator via cfe-commits
ClockMan added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp:20 +void InlineFunctionDeclCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher(decl(functionDecl()).bind("func_decl"), this); +} or

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Piotr Zegar via Phabricator via cfe-commits
ClockMan added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp:31 + // Consider functions only in header files. + if (!Result.SourceManager->getFilename(SrcBegin).ends_with(".h")) +return; Probably better

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-25 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra updated this revision to Diff 492324. sivachandra added a comment. Use explicit type instead of auto. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142592/new/ https://reviews.llvm.org/D142592 Files:

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please add entry in Release Notes. Comment at: clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp:29 + + auto SrcBegin = FuncDecl->getSourceRange().getBegin(); + // Consider functions only in header files.

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-25 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra created this revision. sivachandra added a reviewer: aaron.ballman. Herald added subscribers: ChuanqiXu, carlosgalvezp, ecnelises, tschuett, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. sivachandra requested review of this revision. Herald added a