From: Chris Lattner Date: Sun, 6 Apr 2008 23:09:52 +0000 (+0000) Subject: remove a use of getCanonicalType. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d8bdba5d3534b87cae606d559933bc62752e8828;p=clang 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 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) {