Open
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.