From d8bdba5d3534b87cae606d559933bc62752e8828 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 6 Apr 2008 23:09:52 +0000 Subject: [PATCH] remove a use of getCanonicalType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49294 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/Decl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index d97e0b33e5..e27015b7ef 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -368,9 +368,10 @@ FunctionDecl::~FunctionDecl() { } unsigned FunctionDecl::getNumParams() const { - if (isa(getCanonicalType())) + const FunctionType *FT = getType()->getAsFunctionType(); + if (isa(FT)) return 0; - return cast(getCanonicalType())->getNumArgs(); + return cast(FT)->getNumArgs(); } void FunctionDecl::setParams(ParmVarDecl **NewParamInfo, unsigned NumParams) { -- 2.50.1