<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Poor first diagnostic on ambiguous namespace reference"
href="http://llvm.org/bugs/show_bug.cgi?id=20373">20373</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Poor first diagnostic on ambiguous namespace reference
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nicolasweber@gmx.de
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Nicos-MacBook-Pro:src thakis$ cat test.cc
namespace Foo { class Bar {}; }
namespace A = Foo;
namespace { namespace A = Foo; }
void f() {
A::Bar b;
}
Nicos-MacBook-Pro:src thakis$ ~/src/llvm-build/bin/clang -c test.cc
test.cc:7:3: error: 'A' is not a class, namespace, or scoped enumeration
A::Bar b;
^
test.cc:7:3: error: reference to 'A' is ambiguous
A::Bar b;
^
test.cc:3:11: note: candidate found by name lookup is 'A'
namespace A = Foo;
^
test.cc:4:23: note: candidate found by name lookup is '(anonymous
namespace)::A'
namespace { namespace A = Foo; }
^
2 errors generated.
The second error is great, but the first shouldn't be there. We had this bug
somewhere and were building with -ferror-limit=1 for some reason, and due to
that first diagnostic it took me longer to understand what's going on than it
should have.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>