<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - missing namespaces when underlying type is a template specialization"
href="https://bugs.llvm.org/show_bug.cgi?id=35302">35302</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>missing namespaces when underlying type is a template specialization
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>5.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</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>libclang
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>Istvan.SZOCS@nng.com
</td>
</tr>
<tr>
<th>CC</th>
<td>klimek@google.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I'm trying to analyze c++ header files using libclang python bindings.
The following example illustrates the inconsistent namespace handling in type
aliases.
Sample C++ code:
---------- BEGIN ----------
namespace n{
class MyClass{
};
template<typename T> class MyTemplateClass{
};
}
using namespace n;
using MyClassAlias = MyClass;
using MyTemplateClassAlias = MyTemplateClass<int>;
---------- END ----------
Sample output generated by libclang python binding:
---------- BEGIN ----------
kind: 'TRANSLATION_UNIT' spelling: 'c:\namespace_bug.h'
+--kind: 'NAMESPACE' spelling: 'n'
| +--kind: 'CLASS_DECL' spelling: 'MyClass'
| +--kind: 'CLASS_TEMPLATE' spelling: 'MyTemplateClass'
| +--kind: 'TEMPLATE_TYPE_PARAMETER' spelling: 'T'
+--kind: 'USING_DIRECTIVE'
| +--kind: 'NAMESPACE_REF' spelling: 'n'
+--kind: 'TYPE_ALIAS_DECL' spelling: 'MyClassAlias'
underlying_typedef_type.spelling: 'n::MyClass'
| +--kind: 'TYPE_REF' spelling: 'class n::MyClass'
+--kind: 'TYPE_ALIAS_DECL' spelling: 'MyTemplateClassAlias'
underlying_typedef_type.spelling: 'MyTemplateClass<int>'
+--kind: 'TEMPLATE_REF' spelling: 'MyTemplateClass'
---------- END ----------
Namespace is missing from the spelling of underlying type in the second type
alias decl.</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>