[PATCH] D17214: Stop using "template" when printing qualtype names
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 16 12:38:49 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL261005: Stop using "template" when printing qualtype names (authored by rnk).
Changed prior to commit:
http://reviews.llvm.org/D17214?vs=47854&id=48095#toc
Repository:
rL LLVM
http://reviews.llvm.org/D17214
Files:
cfe/trunk/lib/Tooling/Core/QualTypeNames.cpp
cfe/trunk/unittests/Tooling/QualTypeNamesTest.cpp
Index: cfe/trunk/lib/Tooling/Core/QualTypeNames.cpp
===================================================================
--- cfe/trunk/lib/Tooling/Core/QualTypeNames.cpp
+++ cfe/trunk/lib/Tooling/Core/QualTypeNames.cpp
@@ -329,7 +329,8 @@
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
Index: cfe/trunk/unittests/Tooling/QualTypeNamesTest.cpp
===================================================================
--- cfe/trunk/unittests/Tooling/QualTypeNamesTest.cpp
+++ cfe/trunk/unittests/Tooling/QualTypeNamesTest.cpp
@@ -85,7 +85,8 @@
// 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 @@
" 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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17214.48095.patch
Type: text/x-patch
Size: 1651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160216/1eaa4ec5/attachment.bin>
More information about the cfe-commits
mailing list