[PATCH] D153218: [clang-tidy] Fix `llvmlibc-inline-function-decl` false positives for templated function definitions

André Schackier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 17 23:24:38 PDT 2023


AMS21 created this revision.
AMS21 added reviewers: PiotrZSL, carlosgalvezp.
Herald added a subscriber: xazax.hun.
Herald added a reviewer: njames93.
Herald added a project: All.
AMS21 requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

For a declaration the `FunctionDecl` begin location does not include the
template parameter lists, but for some reason if you have a separate
definitions to the declaration the begin location does include them.
With this patch we now correctly handle that case.

This fixes llvm#62746


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153218

Files:
  clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp
  clang-tools-extra/test/clang-tidy/checkers/llvmlibc/inline-function-decl.hpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153218.532449.patch
Type: text/x-patch
Size: 13381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230618/6b7b9ea6/attachment-0001.bin>


More information about the cfe-commits mailing list