Use the new statement/expression profiling code to unique dependent
template arguments, as in template specialization types. This permits
matching out-of-line definitions of members for class templates that
involve non-type template parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77462 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/StmtProfile.cpp b/lib/AST/StmtProfile.cpp
index 0f241c2..688777d 100644
--- a/lib/AST/StmtProfile.cpp
+++ b/lib/AST/StmtProfile.cpp
@@ -107,6 +107,10 @@
VisitStmt(S);
}
+void StmtProfiler::VisitSwitchStmt(SwitchStmt *S) {
+ VisitStmt(S);
+}
+
void StmtProfiler::VisitWhileStmt(WhileStmt *S) {
VisitStmt(S);
}
@@ -330,6 +334,10 @@
VisitExpr(S);
}
+void StmtProfiler::VisitVAArgExpr(VAArgExpr *S) {
+ VisitExpr(S);
+}
+
void StmtProfiler::VisitInitListExpr(InitListExpr *S) {
if (S->getSyntacticForm()) {
VisitInitListExpr(S->getSyntacticForm());
@@ -416,6 +424,10 @@
ID.AddBoolean(S->getValue());
}
+void StmtProfiler::VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *S) {
+ VisitExpr(S);
+}
+
void StmtProfiler::VisitCXXTypeidExpr(CXXTypeidExpr *S) {
VisitExpr(S);
if (S->isTypeOperand())
@@ -595,6 +607,7 @@
= dyn_cast_or_null<NonTypeTemplateParmDecl>(D)) {
ID.AddInteger(NTTP->getDepth());
ID.AddInteger(NTTP->getIndex());
+ VisitType(NTTP->getType());
return;
}