Skip to content

Commit 203a2b6

Browse files
authored
Merge pull request swiftlang#29323 from LucianoPAlmeida/nfc-minor-comments
[NFC] Fixing minor comments and code
2 parents 68c7a99 + fb12c09 commit 203a2b6

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

lib/Sema/CSDiagnostics.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4620,9 +4620,7 @@ bool InaccessibleMemberFailure::diagnoseAsError() {
46204620
auto &cs = getConstraintSystem();
46214621
auto *locator =
46224622
cs.getConstraintLocator(baseExpr, ConstraintLocator::Member);
4623-
if (llvm::any_of(cs.getFixes(), [&](const ConstraintFix *fix) {
4624-
return fix->getLocator() == locator;
4625-
}))
4623+
if (cs.hasFixFor(locator))
46264624
return false;
46274625
}
46284626

lib/Sema/CSDiagnostics.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,8 @@ class ContextualFailure : public FailureDiagnostic {
558558
/// Diagnose failed conversion in a `CoerceExpr`.
559559
bool diagnoseCoercionToUnrelatedType() const;
560560

561-
// If we're trying to convert something of type "() -> T" to T,
562-
// then we probably meant to call the value.
561+
/// If we're trying to convert something of type "() -> T" to T,
562+
/// then we probably meant to call the value.
563563
bool diagnoseMissingFunctionCall() const;
564564

565565
/// Produce a specialized diagnostic if this is an invalid conversion to Bool.
@@ -1376,11 +1376,11 @@ class MutatingMemberRefOnImmutableBase final : public FailureDiagnostic {
13761376
bool diagnoseAsError() override;
13771377
};
13781378

1379-
// Diagnose an attempt to use AnyObject as the root type of a KeyPath
1380-
//
1381-
// ```swift
1382-
// let keyPath = \AnyObject.bar
1383-
// ```
1379+
/// Diagnose an attempt to use AnyObject as the root type of a KeyPath
1380+
///
1381+
/// ```swift
1382+
/// let keyPath = \AnyObject.bar
1383+
/// ```
13841384
class AnyObjectKeyPathRootFailure final : public FailureDiagnostic {
13851385

13861386
public:

0 commit comments

Comments
 (0)