Skip to content

Commit 95b91ee

Browse files
committed
Apply git-clang-format.
1 parent e884126 commit 95b91ee

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

lib/Sema/CSDiag.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5672,7 +5672,8 @@ static bool isViableOverloadSet(const CalleeCandidateInfo &CCI,
56725672
for (unsigned i = 0; i < CCI.size(); ++i) {
56735673
auto &&cand = CCI[i];
56745674
auto funcDecl = dyn_cast_or_null<AbstractFunctionDecl>(cand.getDecl());
5675-
if (!funcDecl) continue;
5675+
if (!funcDecl)
5676+
continue;
56765677

56775678
auto params = cand.getParameters();
56785679
bool hasVariadicParameter = false;
@@ -5684,7 +5685,8 @@ static bool isViableOverloadSet(const CalleeCandidateInfo &CCI,
56845685
auto defaultMap = computeDefaultMap(params, funcDecl, cand.level);
56855686
InputMatcher IM(params, defaultMap);
56865687
auto result = IM.match(numArgs, pairMatcher);
5687-
if (result == InputMatcher::IM_Succeeded) return true;
5688+
if (result == InputMatcher::IM_Succeeded)
5689+
return true;
56885690
if (result == InputMatcher::IM_HasUnclaimedInput && hasVariadicParameter)
56895691
return true;
56905692
}

lib/Sema/CSRanking.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,8 @@ static bool isDeclAsSpecializedAs(TypeChecker &tc, DeclContext *dc,
660660
return true;
661661
};
662662

663-
auto defaultMap = computeDefaultMap(params2, decl2,
664-
decl2->getDeclContext()->isTypeContext());
663+
auto defaultMap = computeDefaultMap(
664+
params2, decl2, decl2->getDeclContext()->isTypeContext());
665665
auto params2ForMatching = params2;
666666
if (compareTrailingClosureParamsSeparately) {
667667
--numParams1;
@@ -1365,12 +1365,13 @@ SolutionDiff::SolutionDiff(ArrayRef<Solution> solutions) {
13651365
}
13661366

13671367
InputMatcher::InputMatcher(const ArrayRef<AnyFunctionType::Param> params,
1368-
const llvm::SmallBitVector &defaultValueMap) :
1369-
NumSkippedParameters(0), DefaultValueMap(defaultValueMap), Params(params) {
1370-
}
1368+
const llvm::SmallBitVector &defaultValueMap)
1369+
: NumSkippedParameters(0), DefaultValueMap(defaultValueMap),
1370+
Params(params) {}
13711371

1372-
InputMatcher::Result InputMatcher::match(int numInputs,
1373-
std::function<bool(unsigned, unsigned)> pairMatcher) {
1372+
InputMatcher::Result
1373+
InputMatcher::match(int numInputs,
1374+
std::function<bool(unsigned, unsigned)> pairMatcher) {
13741375

13751376
int inputIdx = 0;
13761377
int numParams = Params.size();
@@ -1402,13 +1403,15 @@ InputMatcher::Result InputMatcher::match(int numInputs,
14021403
}
14031404

14041405
// Call custom function to match the input-parameter pair.
1405-
if (!pairMatcher(inputIdx, i)) return IM_CustomPairMatcherFailed;
1406+
if (!pairMatcher(inputIdx, i))
1407+
return IM_CustomPairMatcherFailed;
14061408

14071409
// claim the input as used.
14081410
++inputIdx;
14091411
}
14101412

1411-
if (inputIdx < numInputs) return IM_HasUnclaimedInput;
1413+
if (inputIdx < numInputs)
1414+
return IM_HasUnclaimedInput;
14121415

14131416
return IM_Succeeded;
14141417
}

lib/Sema/CalleeCandidateInfo.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,6 @@ CalleeCandidateInfo::CalleeCandidateInfo(Type baseType,
880880
declName = candidates[0].getDecl()->getBaseName().userFacingName();
881881
}
882882

883-
884883
CalleeCandidateInfo &CalleeCandidateInfo::
885884
operator=(const CalleeCandidateInfo &CCI) {
886885
if (this != &CCI) {

lib/Sema/ConstraintSystem.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3487,7 +3487,6 @@ class OverloadSetCounter : public ASTWalker {
34873487
}
34883488
};
34893489

3490-
34913490
/// \brief Matches array of function parameters to candidate inputs,
34923491
/// which can be anything suitable (e.g., parameters, arguments).
34933492
///
@@ -3516,19 +3515,18 @@ class InputMatcher {
35163515
};
35173516

35183517
InputMatcher(const ArrayRef<AnyFunctionType::Param> params,
3519-
const llvm::SmallBitVector &defaultValueMap);
3518+
const llvm::SmallBitVector &defaultValueMap);
35203519

35213520
/// Matching a given array of inputs.
35223521
///
35233522
/// \param numInputs The number of inputs.
35243523
/// \param pairMatcher Custom matching behavior of an input-parameter pair.
35253524
/// \return the matching result.
3526-
Result match(int numInputs,
3527-
std::function<bool(unsigned inputIdx, unsigned paramIdx)> pairMatcher);
3525+
Result
3526+
match(int numInputs,
3527+
std::function<bool(unsigned inputIdx, unsigned paramIdx)> pairMatcher);
35283528

3529-
size_t getNumSkippedParameters() const {
3530-
return NumSkippedParameters;
3531-
}
3529+
size_t getNumSkippedParameters() const { return NumSkippedParameters; }
35323530
};
35333531
} // end namespace swift
35343532

0 commit comments

Comments
 (0)