-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++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 party
Description
Bugzilla Link | 46979 |
Version | 11.0 |
OS | Windows NT |
CC | @dwblaikie,@zmodem,@JVApen,@poletti-marco,@zygoloid |
Extended Description
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.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++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 party