aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-05-07 00:28:49 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-05-07 00:28:49 +0000
commit6fb94391dc7cb11fd4bbdb969bbab11b6b48c223 (patch)
tree7f9ea96f9295edf3c4534f99797a52b3f7bc44ff /lib/AST/ASTContext.cpp
parentabfe1925e7cb0fbc36944f376b0695a68eebb455 (diff)
Implement encoding of methods which have instantiated
template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index eea727deb4..141f1b9bf9 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -3593,6 +3593,17 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
// Anonymous structures print as '?'
if (const IdentifierInfo *II = RDecl->getIdentifier()) {
S += II->getName();
+ if (ClassTemplateSpecializationDecl *Spec
+ = dyn_cast<ClassTemplateSpecializationDecl>(RDecl)) {
+ const TemplateArgumentList &TemplateArgs = Spec->getTemplateArgs();
+ std::string TemplateArgsStr
+ = TemplateSpecializationType::PrintTemplateArgumentList(
+ TemplateArgs.getFlatArgumentList(),
+ TemplateArgs.flat_size(),
+ (*this).PrintingPolicy);
+
+ S += TemplateArgsStr;
+ }
} else {
S += '?';
}