Mark a function declaration invalid if any of its parameter declarations
are invalid.  Prevents a crash-on-invalid during template instantiation.
I... really don't understand how this wasn't already present.

llvm-svn: 101203
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index ab61487..a2d0e18 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -3098,6 +3098,9 @@
         assert(Param->getDeclContext() != NewFD && "Was set before ?");
         Param->setDeclContext(NewFD);
         Params.push_back(Param);
+
+        if (Param->isInvalidDecl())
+          NewFD->setInvalidDecl();
       }
     }