<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 - Wrong result of TypeName::getFullyQualifiedName(...) for member pointer types with WithGlobalNsPrefix=true"
href="https://bugs.llvm.org/show_bug.cgi?id=40732">40732</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Wrong result of TypeName::getFullyQualifiedName(...) for member pointer types with WithGlobalNsPrefix=true
</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>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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>simon.schroeder@tu-dortmund.de
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Hi,
Description:
If a pointer to member type (MemberPointerType) is passed to
TypeName::getFullyQualifiedName(...) with WithGlobalNsPrefix set to true, the
resulting type string will not contain the global namespace specifier ("::").
More precisely, the global namespace specifier is missing for the member's type
as well as for the class' type. Thus, WithGlobalNsPrefix=true does not work for
pointer to member types.
Example:
Consider the following code:
namespace N {
class C {
public:
int m1;
C* m2;
};
void f() {
int C::*mp1;
C* C::*mp2;
}
}
int main() {
N::f();
}
Now, when looking at the variables' types:
mp1's type:
Expected (fully qualified type string with global namespace specifier):
int ::N::C::*
getFullyQualifiedName's result:
int N::C::*
mp2's type:
Expected (fully qualified type string with global namespace specifier):
::N::C *::N::C::*
getFullyQualifiedName's result:
N::C *N::C::*</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>