Skip to content

Commit c235900

Browse files
author
git apple-llvm automerger
committed
Merge commit '97d7995c4d5a' from apple/master into swift/master-next
2 parents 503ab87 + 97d7995 commit c235900

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clang/lib/Sema/SemaExceptionSpec.cpp

+3-4
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)