https://bugs.llvm.org/show_bug.cgi?id=46979
Bug ID: 46979
Summary: -Wdtor-name incorrect on inner class
Product: clang
Version: 11.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
See https://compiler-explorer.com/z/vY5xo8
// clang++ -Wdtor-name t.cpp
class A
{
template <typename T>
class B;
};
template<typename T>
class A::B
{
~B();
};
template<typename T>
A::B<T>::~B()
{
}
// Result:
<source>:14:8: warning: ISO C++ requires the name after '::~' to be found in
the same scope as the name before '::~' [-Wdtor-name]
A::B<T>::~B()
~~~~~~~^~
::B
As far as I can see, this code is correct and this warning is giving a false
positive.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs