Skip to content

Commit

Permalink
[Clang][P1061] Use cast_if_present
Browse files Browse the repository at this point in the history
  • Loading branch information
ricejasonf committed Jan 18, 2025
1 parent 765db8a commit 8cf8205
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions clang/lib/Sema/SemaTemplateVariadic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,7 @@ bool Sema::CheckParameterPacksForExpansion(
CurrentInstantiationScope->findInstantiationOf(ND);
Decl *B = cast<Decl *>(*Instantiation);
Expr *BindingExpr = cast<BindingDecl>(B)->getBinding();
ResolvedPack =
dyn_cast_if_present<ResolvedUnexpandedPackExpr>(BindingExpr);
ResolvedPack = cast_if_present<ResolvedUnexpandedPackExpr>(BindingExpr);
if (!ResolvedPack) {
ShouldExpand = false;
continue;
Expand Down

0 comments on commit 8cf8205

Please sign in to comment.