diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-08-30 22:22:09 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-08-30 22:22:09 +0000 |
commit | 482466b76174738def05d4ae3c3240bc83b57426 (patch) | |
tree | 3e884e5a781d8ea51a2d4372e82b726c305189f7 /lib/AST/Decl.cpp | |
parent | ccc4f283cf0e892e19a097a2aa4ec4491682b15f (diff) |
Switch a couple getAs uses to castAs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index d5b0be3ba4..bfc6f61c8f 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -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(); |