misc-unused-parameters: Don't touch K&R style functions.

We couldn't calculate the removal ranges properly at this point.

llvm-svn: 244454
diff --git a/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp b/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp
index f7770cc..326fb05 100644
--- a/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp
@@ -97,7 +97,8 @@
 
 void UnusedParametersCheck::check(const MatchFinder::MatchResult &Result) {
   const auto *Function = Result.Nodes.getNodeAs<FunctionDecl>("function");
-  if (!Function->doesThisDeclarationHaveABody())
+  if (!Function->doesThisDeclarationHaveABody() ||
+      !Function->hasWrittenPrototype())
     return;
   for (unsigned i = 0, e = Function->getNumParams(); i != e; ++i) {
     const auto *Param = Function->getParamDecl(i);