Author: Timm Bäder Date: 2022-11-16T10:02:52+01:00 New Revision: 051230359c6e405a41ecad48162939f8a00c0532
URL: https://github.com/llvm/llvm-project/commit/051230359c6e405a41ecad48162939f8a00c0532 DIFF: https://github.com/llvm/llvm-project/commit/051230359c6e405a41ecad48162939f8a00c0532.diff LOG: [clang][NFC] Remove unused CastForMoving parameter Nothing ever passes a third parameter to CastForMoving. Added: Modified: clang/lib/Sema/SemaDeclCXX.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index a15824fb7d90f..0ea99a835e887 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -4691,10 +4691,10 @@ Sema::BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo, } // Create a static_cast\<T&&>(expr). -static Expr *CastForMoving(Sema &SemaRef, Expr *E, QualType T = QualType()) { - if (T.isNull()) T = E->getType(); - QualType TargetType = SemaRef.BuildReferenceType( - T, /*SpelledAsLValue*/false, SourceLocation(), DeclarationName()); +static Expr *CastForMoving(Sema &SemaRef, Expr *E) { + QualType TargetType = + SemaRef.BuildReferenceType(E->getType(), /*SpelledAsLValue*/ false, + SourceLocation(), DeclarationName()); SourceLocation ExprLoc = E->getBeginLoc(); TypeSourceInfo *TargetLoc = SemaRef.Context.getTrivialTypeSourceInfo( TargetType, ExprLoc); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits