[llvm-bugs] [Bug 44978] New: Ambiguous destructor lookup after 0e3a4877840

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 20 11:20:51 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=44978

            Bug ID: 44978
           Summary: Ambiguous destructor lookup after 0e3a4877840
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dmajor at mozilla.com
                CC: froydnj at gmail.com, htmldeveloper at gmail.com,
                    llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk, sylvestre at debian.org

After llvmorg-11-init-2485-g0e3a4877840, the following code gives an error:

---

namespace n {
class Foo {};
}

class Foo {};

using namespace n;

static void func(::Foo* p) {
    p->~Foo();
}

---

<source>:10:9: error: reference to 'Foo' is ambiguous
    p->~Foo();
        ^
<source>:5:7: note: candidate found by name lookup is 'Foo'
class Foo {};
      ^
<source>:2:7: note: candidate found by name lookup is 'n::Foo'
class Foo {};

---

At first glance this does not seem to be the kind of code that the commit was
targeting, though I'm not completely sure. Is the new behavior intentional?

-- 
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/20200220/1d38839a/attachment.html>


More information about the llvm-bugs mailing list