Skip to content

Commit 9ef951d

Browse files
author
anikelal
committed
Changing dyn_cast and assert to cast
1 parent 05eb73a commit 9ef951d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/CodeGen/CGCall.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,7 @@ CodeGenTypes::arrangeCXXConstructorCall(const CallArgList &args,
500500
/// definition of the given function.
501501
const CGFunctionInfo &
502502
CodeGenTypes::arrangeFunctionDeclaration(const GlobalDecl GD) {
503-
const FunctionDecl *FD = dyn_cast<FunctionDecl>(GD.getDecl());
504-
assert(FD && "GD must contain FunctionDecl");
503+
const FunctionDecl *FD = cast<FunctionDecl>(GD.getDecl());
505504
if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD))
506505
if (MD->isImplicitObjectMemberFunction())
507506
return arrangeCXXMethodDeclaration(MD);

0 commit comments

Comments
 (0)