Test that all of the relevant types properly compute the "contains
unexpanded parameter pack" bit and that the recursive AST visitor can
then find those unexpanded parameter packs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121899 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplateVariadic.cpp b/lib/Sema/SemaTemplateVariadic.cpp
index 677b146..0577929 100644
--- a/lib/Sema/SemaTemplateVariadic.cpp
+++ b/lib/Sema/SemaTemplateVariadic.cpp
@@ -103,9 +103,14 @@
       return true;
     }
 
-    /// \brief Suppress traversal of declarations, since they cannot
-    /// contain unexpanded parameter packs.
-    bool TraverseDecl(Decl *D) { return true; }
+    /// \brief Suppress traversal of non-parameter declarations, since
+    /// they cannot contain unexpanded parameter packs.
+    bool TraverseDecl(Decl *D) { 
+      if (D && isa<ParmVarDecl>(D))
+        return inherited::TraverseDecl(D);
+
+      return true; 
+    }
   };
 }