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 | f7a1a744eba4b29ceb0f20af8f34515d892fdd64 (patch) | |
tree | 9698ed40b4b0973e9f2e64c7af2fd896b154ed43 /lib/AST/StmtProfile.cpp | |
parent | 909e58988b3a3bb2ad36bec03aafa1302544fd73 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/StmtProfile.cpp')
-rw-r--r-- | lib/AST/StmtProfile.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/AST/StmtProfile.cpp b/lib/AST/StmtProfile.cpp index f238451465..2699cdfc4f 100644 --- a/lib/AST/StmtProfile.cpp +++ b/lib/AST/StmtProfile.cpp @@ -517,7 +517,11 @@ void StmtProfiler::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *S) { void StmtProfiler::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *S) { VisitExpr(S); + VisitNestedNameSpecifier(S->getQualifier()); VisitName(S->getName()); + ID.AddBoolean(S->hasExplicitTemplateArgs()); + if (S->hasExplicitTemplateArgs()) + VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs()); } void StmtProfiler::VisitUnaryTypeTraitExpr(UnaryTypeTraitExpr *S) { @@ -531,14 +535,9 @@ StmtProfiler::VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *S) { VisitExpr(S); VisitName(S->getDeclName()); VisitNestedNameSpecifier(S->getQualifier()); - ID.AddBoolean(S->isAddressOfOperand()); -} - -void StmtProfiler::VisitTemplateIdRefExpr(TemplateIdRefExpr *S) { - VisitExpr(S); - VisitNestedNameSpecifier(S->getQualifier()); - VisitTemplateName(S->getTemplateName()); - VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs()); + ID.AddBoolean(S->hasExplicitTemplateArgs()); + if (S->hasExplicitTemplateArgs()) + VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs()); } void StmtProfiler::VisitCXXExprWithTemporaries(CXXExprWithTemporaries *S) { |