]> granicus.if.org Git - clang/commitdiff
Canonicalize template template parameters. We can't test this yet, but
authorDouglas Gregor <dgregor@apple.com>
Fri, 31 Jul 2009 15:46:56 +0000 (15:46 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 31 Jul 2009 15:46:56 +0000 (15:46 +0000)
it's "obviously correct" :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77677 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/StmtProfile.cpp

index 791c4398fbe98ccd579296ad8a4297c4e2119d5d..5a04df04065ace2b7ad7e654b5e67c504d51440d 100644 (file)
@@ -622,7 +622,11 @@ void StmtProfiler::VisitDecl(Decl *D) {
       return;
     }
     
-    // FIXME: Template template parameters?
+    if (TemplateTemplateParmDecl *TTP = dyn_cast<TemplateTemplateParmDecl>(D)) {
+      ID.AddInteger(TTP->getDepth());
+      ID.AddInteger(TTP->getIndex());
+      return;
+    }
     
     if (OverloadedFunctionDecl *Ovl = dyn_cast<OverloadedFunctionDecl>(D)) {
       // Canonicalize all of the function declarations within the overload