From: Yaron Keren Date: Wed, 23 Dec 2015 20:38:13 +0000 (+0000) Subject: Replace isa+cast with dyn_cast and obey the no else after return rule. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ae67bd6383efe98156e482f53098133727cbeef;p=clang Replace isa+cast with dyn_cast and obey the no else after return rule. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256349 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 834d75daa4..434b421afb 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -4928,14 +4928,10 @@ Sema::ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, // We aren't supposed to apply this logic for if there's an '&' involved. if (!find.HasFormOfMemberPointer) { OverloadExpr *ovl = find.Expression; - if (isa(ovl)) { - UnresolvedLookupExpr *ULE = cast(ovl); + if (UnresolvedLookupExpr *ULE = dyn_cast(ovl)) return BuildOverloadedCallExpr(S, Fn, ULE, LParenLoc, ArgExprs, RParenLoc, ExecConfig); - } else { - return BuildCallToMemberFunction(S, Fn, LParenLoc, ArgExprs, - RParenLoc); - } + return BuildCallToMemberFunction(S, Fn, LParenLoc, ArgExprs, RParenLoc); } }