[clang] 0512303 - [clang][NFC] Remove unused CastForMoving parameter
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 16 01:03:04 PST 2022
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);
More information about the cfe-commits
mailing list