diff options
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 61dbf24b456..f7e1e3fdffd 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -1061,10 +1061,10 @@ QualType ASTContext::getNoReturnType(QualType T) { if (!T->isFunctionType()) assert(0 && "can't noreturn qualify non-pointer to function or block type"); - if (const FunctionNoProtoType *F = dyn_cast<FunctionNoProtoType>(T)) { + if (const FunctionNoProtoType *F = T->getAsFunctionNoProtoType()) { return getFunctionNoProtoType(F->getResultType(), true); } - const FunctionProtoType *F = cast<FunctionProtoType>(T); + const FunctionProtoType *F = T->getAsFunctionProtoType(); return getFunctionType(F->getResultType(), F->arg_type_begin(), F->getNumArgs(), F->isVariadic(), F->getTypeQuals(), F->hasExceptionSpec(), F->hasAnyExceptionSpec(), |