-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
Calling getQualifiedNameAsString()
for a function decl in a namespace will end up duplicating the namespace.
Test case (using the pattern from LookupTest.cpp):
namespace {
struct CheckFunctionDeclVisitor : TestVisitor {
bool VisitFunctionDecl(FunctionDecl *FD) override {
EXPECT_EQ("x::y::Foo::Foo<T>", FD->getQualifiedNameAsString());
return true;
}
};
}
TEST(LookupTest, namespaceInQualifiedName) {
CheckFunctionDeclVisitor Visitor;
Visitor.runOver(
"namespace x { namespace y {\n"
"template <typename T> class Foo { Foo() {} };\n"
"}}");
}
This passes prior to #147835. After that, and still at trunk, it fails:
Expected equality of these values:
"x::y::Foo::Foo<T>"
FD->getQualifiedNameAsString()
Which is: "x::y::Foo::x::y::Foo<T>"
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"