summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Tooling/Core/QualTypeNames.cpp3
-rw-r--r--clang/unittests/Tooling/QualTypeNamesTest.cpp8
2 files changed, 9 insertions, 2 deletions
diff --git a/clang/lib/Tooling/Core/QualTypeNames.cpp b/clang/lib/Tooling/Core/QualTypeNames.cpp
index 2ff6bad4064..02773be2a18 100644
--- a/clang/lib/Tooling/Core/QualTypeNames.cpp
+++ b/clang/lib/Tooling/Core/QualTypeNames.cpp
@@ -329,7 +329,8 @@ NestedNameSpecifier *createNestedNameSpecifier(
NestedNameSpecifier *createNestedNameSpecifier(
const ASTContext &Ctx, const TypeDecl *TD, bool FullyQualify) {
return NestedNameSpecifier::Create(Ctx, createOuterNNS(Ctx, TD, FullyQualify),
- true /*Template*/, TD->getTypeForDecl());
+ false /*No TemplateKeyword*/,
+ TD->getTypeForDecl());
}
/// \brief Return the fully qualified type, including fully-qualified
diff --git a/clang/unittests/Tooling/QualTypeNamesTest.cpp b/clang/unittests/Tooling/QualTypeNamesTest.cpp
index 889c5252319..d7e7de52e88 100644
--- a/clang/unittests/Tooling/QualTypeNamesTest.cpp
+++ b/clang/unittests/Tooling/QualTypeNamesTest.cpp
@@ -85,7 +85,8 @@ TEST(QualTypeNameTest, getFullyQualifiedName) {
// Namespace alias
Visitor.ExpectedQualTypeNames["CheckL"] = "A::B::C::MyInt";
Visitor.ExpectedQualTypeNames["non_dependent_type_var"] =
- "template Foo<X>::non_dependent_type";
+ "Foo<X>::non_dependent_type";
+ Visitor.ExpectedQualTypeNames["AnEnumVar"] = "EnumScopeClass::AnEnum";
Visitor.runOver(
"int CheckInt;\n"
"namespace A {\n"
@@ -143,6 +144,11 @@ TEST(QualTypeNameTest, getFullyQualifiedName) {
" var.dependent_type_var = 0;\n"
"var.non_dependent_type_var = 0;\n"
"}\n"
+ "class EnumScopeClass {\n"
+ "public:\n"
+ " enum AnEnum { ZERO, ONE };\n"
+ "};\n"
+ "EnumScopeClass::AnEnum AnEnumVar;\n"
);
TypeNameVisitor Complex;
OpenPOWER on IntegriCloud