Skip to content

Commit c677d14

Browse files
committed
Sema: Fix some unused variable warnings
1 parent 55297ae commit c677d14

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Sema/CSDiag.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2465,7 +2465,7 @@ diagnoseTypeMemberOnInstanceLookup(Type baseObjTy,
24652465
Diag.emplace(diagnose(loc,
24662466
diag::assoc_type_outside_of_protocol,
24672467
ATD->getName()));
2468-
} else if (auto CD = dyn_cast<ConstructorDecl>(member)) {
2468+
} else if (isa<ConstructorDecl>(member)) {
24692469
Diag.emplace(diagnose(loc,
24702470
diag::construct_protocol_by_name,
24712471
metatypeTy->getInstanceType()));
@@ -5508,13 +5508,13 @@ static bool isRawRepresentableMismatch(Type fromType, Type toType,
55085508
// First check if this is an attempt to convert from something to
55095509
// raw representable.
55105510
if (conformsToKnownProtocol(fromType, kind, CS)) {
5511-
if (auto rawType = isRawRepresentable(toType, kind, CS))
5511+
if (isRawRepresentable(toType, kind, CS))
55125512
return true;
55135513
}
55145514

55155515
// Otherwise, it might be an attempt to convert from raw representable
55165516
// to its raw value.
5517-
if (auto rawType = isRawRepresentable(fromType, kind, CS)) {
5517+
if (isRawRepresentable(fromType, kind, CS)) {
55185518
if (conformsToKnownProtocol(toType, kind, CS))
55195519
return true;
55205520
}

0 commit comments

Comments
 (0)