forked from OSchip/llvm-project
parent
a3d3fe9be6
commit
5c27c4cef0
|
@ -903,7 +903,7 @@ std::string NamedDecl::getQualifiedNameAsString(const PrintingPolicy &P) const {
|
|||
} else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {
|
||||
const FunctionProtoType *FT = 0;
|
||||
if (FD->hasWrittenPrototype())
|
||||
FT = dyn_cast<FunctionProtoType>(FD->getType()->getAs<FunctionType>());
|
||||
FT = dyn_cast<FunctionProtoType>(FD->getType()->castAs<FunctionType>());
|
||||
|
||||
OS << *FD << '(';
|
||||
if (FT) {
|
||||
|
@ -1859,7 +1859,7 @@ unsigned FunctionDecl::getBuiltinID() const {
|
|||
/// based on its FunctionType. This is the length of the ParamInfo array
|
||||
/// after it has been created.
|
||||
unsigned FunctionDecl::getNumParams() const {
|
||||
const FunctionType *FT = getType()->getAs<FunctionType>();
|
||||
const FunctionType *FT = getType()->castAs<FunctionType>();
|
||||
if (isa<FunctionNoProtoType>(FT))
|
||||
return 0;
|
||||
return cast<FunctionProtoType>(FT)->getNumArgs();
|
||||
|
|
Loading…
Reference in New Issue