remove a use of getCanonicalType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49294 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index d97e0b3..e27015b 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -368,9 +368,10 @@
 }
 
 unsigned FunctionDecl::getNumParams() const {
-  if (isa<FunctionTypeNoProto>(getCanonicalType()))
+  const FunctionType *FT = getType()->getAsFunctionType();
+  if (isa<FunctionTypeNoProto>(FT))
     return 0;
-  return cast<FunctionTypeProto>(getCanonicalType())->getNumArgs();
+  return cast<FunctionTypeProto>(FT)->getNumArgs();
 }
 
 void FunctionDecl::setParams(ParmVarDecl **NewParamInfo, unsigned NumParams) {