[llvm-bugs] [Bug 46979] New: -Wdtor-name incorrect on inner class

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 4 03:47:53 PDT 2020


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: unassignedclangbugs at nondot.org
          Reporter: jvapen at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200804/52b7158b/attachment.html>


More information about the llvm-bugs mailing list