Skip to content

Commit 97d7995

Browse files
author
git apple-llvm automerger
committed
Merge commit 'afb163f53ad5' from llvm.org/master into apple/master
2 parents 5abd1c6 + afb163f commit 97d7995

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clang/lib/Sema/SemaExceptionSpec.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ static bool hasImplicitExceptionSpec(FunctionDecl *Decl) {
263263
if (!Decl->getTypeSourceInfo())
264264
return isa<CXXDestructorDecl>(Decl);
265265

266-
const FunctionProtoType *Ty =
267-
Decl->getTypeSourceInfo()->getType()->getAs<FunctionProtoType>();
266+
auto *Ty = Decl->getTypeSourceInfo()->getType()->castAs<FunctionProtoType>();
268267
return !Ty->hasExceptionSpec();
269268
}
270269

@@ -965,9 +964,9 @@ bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New,
965964
PDiag(diag::err_deep_exception_specs_differ),
966965
PDiag(diag::note_overridden_virtual_function),
967966
PDiag(diag::ext_override_exception_spec),
968-
Old->getType()->getAs<FunctionProtoType>(),
967+
Old->getType()->castAs<FunctionProtoType>(),
969968
Old->getLocation(),
970-
New->getType()->getAs<FunctionProtoType>(),
969+
New->getType()->castAs<FunctionProtoType>(),
971970
New->getLocation());
972971
}
973972

0 commit comments

Comments
 (0)