Skip to content

Commit

Permalink
[clang][ExprConst] Remove unnecessary cast
Browse files Browse the repository at this point in the history
FD is a FunctionDecl, so no need to cast a FunctionDecl to a
CXXMethodDecl just to assign it to a FunctionDecl.
  • Loading branch information
tbaederr committed Feb 8, 2024
1 parent fe8a62c commit d63c8be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clang/lib/AST/ExprConstant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8006,7 +8006,8 @@ class ExprEvaluatorBase
assert(CorrespondingCallOpSpecialization &&
"We must always have a function call operator specialization "
"that corresponds to our static invoker specialization");
FD = cast<CXXMethodDecl>(CorrespondingCallOpSpecialization);
assert(isa<CXXMethodDecl>(CorrespondingCallOpSpecialization));
FD = CorrespondingCallOpSpecialization;
} else
FD = LambdaCallOp;
} else if (FD->isReplaceableGlobalAllocationFunction()) {
Expand Down

0 comments on commit d63c8be

Please sign in to comment.