<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:jdevlieghere@apple.com" title="Jonas Devlieghere <jdevlieghere@apple.com>"> <span class="fn">Jonas Devlieghere</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - LLDB's name lookup is completely wrong for C++"
href="https://bugs.llvm.org/show_bug.cgi?id=21662">bug 21662</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>jdevlieghere@apple.com
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>WORKSFORME
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - LLDB's name lookup is completely wrong for C++"
href="https://bugs.llvm.org/show_bug.cgi?id=21662#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - LLDB's name lookup is completely wrong for C++"
href="https://bugs.llvm.org/show_bug.cgi?id=21662">bug 21662</a>
from <span class="vcard"><a class="email" href="mailto:jdevlieghere@apple.com" title="Jonas Devlieghere <jdevlieghere@apple.com>"> <span class="fn">Jonas Devlieghere</span></a>
</span></b>
<pre>Both issues appear to have been fixed.
(lldb) target create "/tmp/a.out"
Current executable set to '/tmp/a.out' (x86_64).
(lldb) b f
Breakpoint 1: where = a.out`f(int, int) + 10 at main.cpp:5:12, address =
0x0000000100000f8a
(lldb) r
Process 48254 launched: '/tmp/a.out' (x86_64)
Process 48254 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x0000000100000f8a a.out`f(N=1, M=2) at main.cpp:5:12
2 namespace M { volatile int x; }
3
4 void f(int N, int M) {
-> 5 ::N::x = N;
6 ::M::x = M;
7 }
8
(lldb) p N
(int) $0 = 1
(lldb) p M
(int) $1 = 2
(lldb) p ::N::x
(volatile int) $2 = 0
(lldb) p ::N
error: reference to 'N' is ambiguous
...
(lldb) target create "/tmp/a.out"
Current executable set to '/tmp/a.out' (x86_64).
(lldb) b f
Breakpoint 1: where = a.out`N::S1::f(N::S2&) + 12 at main.cpp:16:18, address =
0x0000000100000f6c
(lldb) r
Process 60495 launched: '/tmp/a.out' (x86_64)
Process 60495 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x0000000100000f6c a.out`N::S1::f(this=0x00007ffeefbff658,
M1=0x00007ffeefbff650) at main.cpp:16:18
13 using namespace N;
14
15 void S1::f(S2 &M1) {
-> 16 N::M1::M2::x = M1.x;
17 }
18
19 int main() {
(lldb) p M1
(N::S2) $0 = (x = 42)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>