summaryrefslogtreecommitdiffstats
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2017-11-28 16:14:14 +0000
committerSerge Pavlov <sepavloff@gmail.com>2017-11-28 16:14:14 +0000
commit9fadf2235fe09410022228e4967eec29e0b92ca7 (patch)
tree8e5d0d6f76939456d1af2d15dda03a5829347fbd /lib/AST/Decl.cpp
parentecd2a2a00fca50bdfaaa353792d66ccac36afe18 (diff)
Refactor functions PrintTemplateArgumentList
These functions were defined as static members of TemplateSpecializationType. Now they are moved to namespace level. Previously there were different implementations for lists containing TemplateArgument and TemplateArgumentLoc, now these implementations share the same code. This change is a result of refactoring patch D40508. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319178 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index ce9b46c070..a755e61b75 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -1506,8 +1506,7 @@ void NamedDecl::printQualifiedName(raw_ostream &OS,
if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(DC)) {
OS << Spec->getName();
const TemplateArgumentList &TemplateArgs = Spec->getTemplateArgs();
- TemplateSpecializationType::PrintTemplateArgumentList(
- OS, TemplateArgs.asArray(), P);
+ printTemplateArgumentList(OS, TemplateArgs.asArray(), P);
} else if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) {
if (P.SuppressUnwrittenScope &&
(ND->isAnonymousNamespace() || ND->isInline()))
@@ -2556,8 +2555,7 @@ void FunctionDecl::getNameForDiagnostic(
NamedDecl::getNameForDiagnostic(OS, Policy, Qualified);
const TemplateArgumentList *TemplateArgs = getTemplateSpecializationArgs();
if (TemplateArgs)
- TemplateSpecializationType::PrintTemplateArgumentList(
- OS, TemplateArgs->asArray(), Policy);
+ printTemplateArgumentList(OS, TemplateArgs->asArray(), Policy);
}
bool FunctionDecl::isVariadic() const {