-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Open
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partyVerified by a second partyfalse-positiveWarning fires when it should notWarning fires when it should not
Description
Given the following code:
#define TYPE_OR_NONTYPE typename
template<TYPE_OR_NONTYPE T>
struct BaseT {
static int ff();
void Foo();
};
template<TYPE_OR_NONTYPE T>
struct DerivedT : BaseT<T> {
void Inner();
};
template<TYPE_OR_NONTYPE T>
void DerivedT<T>::Inner() {
using K = BaseT<T>;
this->K::Foo();
}
clang emits a unused typedef warning.
⇒ ./bin/clang -Xclang -fsyntax-only -Wunused-local-typedef --std=c++20 /tmp/t2.cpp
/tmp/t2.cpp:15:9: warning: unused type alias 'K' [-Wunused-local-typedef]
15 | using K = BaseT<T>;
|
This is shown in abseil/abseil-cpp#1711.
Metadata
Metadata
Assignees
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partyVerified by a second partyfalse-positiveWarning fires when it should notWarning fires when it should not