https://bugs.llvm.org/show_bug.cgi?id=40732
Bug ID: 40732
Summary: Wrong result of TypeName::getFullyQualifiedName(...)
for member pointer types with WithGlobalNsPrefix=true
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: simon.schroe...@tu-dortmund.de
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk
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::*
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs