diff options
author | John McCall <rjmccall@apple.com> | 2009-11-24 19:00:30 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-11-24 19:00:30 +0000 |
commit | e66edc18ae0fc17169fa61d3c6fab9d48b1eb751 (patch) | |
tree | f3f4529d2fda3aa455db1f495ebaa7a228f7b782 /clang/lib/AST/StmtPrinter.cpp | |
parent | 95c66b9ddc235eecc773abf8d8845e66bb4066d8 (diff) | |
download | bcm5719-llvm-e66edc18ae0fc17169fa61d3c6fab9d48b1eb751.tar.gz bcm5719-llvm-e66edc18ae0fc17169fa61d3c6fab9d48b1eb751.zip |
Rip out TemplateIdRefExpr and make UnresolvedLookupExpr and
DependentScopeDeclRefExpr support storing templateids. Unite the common
code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr.
This gets us to a point where we don't need to store function templates in
the AST using TemplateNames, which is critical to ripping out OverloadedFunction.
Also resolves a few FIXMEs.
llvm-svn: 89785
Diffstat (limited to 'clang/lib/AST/StmtPrinter.cpp')
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 34ca7985798..a7cfed97884 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -487,20 +487,22 @@ void StmtPrinter::VisitDependentScopeDeclRefExpr( DependentScopeDeclRefExpr *Node) { Node->getQualifier()->print(OS, Policy); OS << Node->getDeclName().getAsString(); + if (Node->hasExplicitTemplateArgs()) + OS << TemplateSpecializationType::PrintTemplateArgumentList( + Node->getTemplateArgs(), + Node->getNumTemplateArgs(), + Policy); } void StmtPrinter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *Node) { - OS << Node->getName().getAsString(); -} - -void StmtPrinter::VisitTemplateIdRefExpr(TemplateIdRefExpr *Node) { if (Node->getQualifier()) Node->getQualifier()->print(OS, Policy); - Node->getTemplateName().print(OS, Policy, true); - OS << TemplateSpecializationType::PrintTemplateArgumentList( - Node->getTemplateArgs(), + OS << Node->getName().getAsString(); + if (Node->hasExplicitTemplateArgs()) + OS << TemplateSpecializationType::PrintTemplateArgumentList( + Node->getTemplateArgs(), Node->getNumTemplateArgs(), - Policy); + Policy); } void StmtPrinter::VisitObjCIvarRefExpr(ObjCIvarRefExpr *Node) { |