A function call to getFullyQualifiedType with a dependent name type is not resolved correctly.
For the definition of:
namespace name {
template
struct AB {
struct Test {
using Type = T;
};
AB() {}
void func(Test a, typename Test::Type b) {}
};
}
The arguments of func are resolved to:
Parameter: a
Full qual type: name::AB::Test
Parameter: b
Full qual type: typename Test::Type
I tried to find the error and could get a partial patch:
--- a/QualTypeNames.cpp 2019-02-06 14:50:37.169581290 +0100
+++ b/QualTypeNames.cpp 2019-02-06 14:53:08.114611002 +0100
@@ -326,6 +326,8 @@
Decl = TagDeclType->getDecl();
} else if (const auto *TST = dyn_cast(TypePtr)) {
Decl = TST->getTemplateName().getAsTemplateDecl();
Extended Description
A function call to getFullyQualifiedType with a dependent name type is not resolved correctly.
For the definition of: namespace name { template
struct AB {
struct Test {
using Type = T;
};
AB() {}
};
}
The arguments of func are resolved to: Parameter: a Full qual type: name::AB::Test
Parameter: b
Full qual type: typename Test::Type
I tried to find the error and could get a partial patch: --- a/QualTypeNames.cpp 2019-02-06 14:50:37.169581290 +0100 +++ b/QualTypeNames.cpp 2019-02-06 14:53:08.114611002 +0100 @@ -326,6 +326,8 @@ Decl = TagDeclType->getDecl(); } else if (const auto *TST = dyn_cast(TypePtr)) {
Decl = TST->getTemplateName().getAsTemplateDecl();
With this Patch the result is now: Parameter: a Full qual type: name::AB::Test
Parameter: b
Full qual type: name::AB::typename Test::Type
I could not get how to convert the DependentNameType to a regular type.
The expected result would be: Parameter: a Full qual type: name::AB::Test
Parameter: b
Full qual type: typename name::AB::Test::Type
Find attached the compile script, the example file, the patch and the tooling implementation which shows the bug.