llvm-project
llvm-project copied to clipboard
False positive misc-confusable-identifier: confusing template argument and function from different classes
Getting the following on latest trunk:
#include <gtest/gtest.h>
struct Foo
{
void l();
};
[source>:5:10: warning: 'l' is confusable with 'I' [misc-confusable-identifiers]]
void l();
^
/opt/compiler-explorer/libs/googletest/trunk/googletest/include/gtest/internal/gtest-param-util.h:842:23: note: other declaration found here
template <size_t... I>
^
@llvm/issue-subscribers-clang-tidy
Reduced self-contained example:
template <typename T>
struct Foo
{};
template <typename T, int... I>
struct Bar : Foo<T>
{};
struct Baz
{
void l();
};
https://godbolt.org/z/do78n3ahh
Need to be re-verified but example no longer produce warning on trunk.
Fixed in LLVM 17. Somehow by 2a84c635f2a1dcb4546a5d751a32eac24103c7e6.