<html>
<head>
<base href="https://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 --- - NamedDecl::printQualifiedName includes extra scope for unscoped enums"
href="https://llvm.org/bugs/show_bug.cgi?id=25423">25423</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>NamedDecl::printQualifiedName includes extra scope for unscoped enums
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>libclang
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>saugustine@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>klimek@google.com, llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Consider an unscoped enum, defined within a class:
class aclass{
enum { x };
};
enumerator_x_decl->getQualifiedName();
returns
aclass::::x
because x's enumeration decl doesn't have a name.
The correct name is:
aclass::x (C++ [dcl.enum]p10).
This is also easy to see with an ast dump, which uses different code to print
the scope:
`-EnumDecl 0x359fd10 <line:2:1, col:10> col:1
`-EnumConstantDecl 0x359fdc0 <col:8> col:8 x 'enum aclass::(anonymous at
enum.cc:2:1)'
NamedDecl::printQualifiedName should handle unscoped enumerations similar to
how it handles anonymous namespaces. I'll submit a patch shortly to fix this.</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>