Skip to content

Commit 10e75d6

Browse files
committed
Use exciting and modern C++17.
1 parent b845baa commit 10e75d6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/CodeGen/CGExprScalar.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,8 +2363,7 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
23632363
// manufactured and them residing in the IndirectAS is a target specific
23642364
// detail, and doing an AS cast here still retains the semantics the user
23652365
// expects. It is desirable to remove this iff a better solution is found.
2366-
if (SrcTy != DstTy && isa<llvm::Argument>(Src) &&
2367-
cast<llvm::Argument>(Src)->hasStructRetAttr())
2366+
if (auto A = dyn_cast<llvm::Argument>(Src); A && A->hasStructRetAttr())
23682367
return CGF.CGM.getTargetCodeGenInfo().performAddrSpaceCast(
23692368
CGF, Src, E->getType().getAddressSpace(), DestTy.getAddressSpace(),
23702369
DstTy);

0 commit comments

Comments
 (0)