[clang-tidy] Fix `llvmlibc-inline-function-decl` false positives for templated functi...
authorAMS21 <AMS21.github@gmail.com>
Sun, 18 Jun 2023 11:40:32 +0000 (11:40 +0000)
committerPiotr Zegar <me@piotrzegar.pl>
Sun, 18 Jun 2023 11:40:33 +0000 (11:40 +0000)
commitc96306db2cad4cf687cb044c8a0635f982a4db98
tree22b96031d0a77153a493f2e1021226f9ef2e6318
parented0620fd24a174d420c889454544697f57248b88
[clang-tidy] Fix `llvmlibc-inline-function-decl` false positives for templated function definitions

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

Reviewed By: PiotrZSL

Differential Revision: https://reviews.llvm.org/D153218
clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/test/clang-tidy/checkers/llvmlibc/inline-function-decl.hpp