Fixed some common grammatical errors in the comments. (#38248)

This commit is contained in:
OneUpWallStreet
2021-07-05 01:00:48 -07:00
committed by GitHub
parent 8524ea96e7
commit 25df5d2c48
5 changed files with 34 additions and 33 deletions

View File

@@ -1383,11 +1383,11 @@ enum class ConstraintSystemFlags {
/// If set, verbose output is enabled for this constraint system.
///
/// Note that this flag is automatically applied to all constraint systems
/// Note that this flag is automatically applied to all constraint systems,
/// when \c DebugConstraintSolver is set in \c TypeCheckerOptions. It can be
/// automatically enabled for select constraint solving attempts by setting
/// \c DebugConstraintSolverAttempt. Finally, it be automatically enabled
/// for a pre-configured set of expressions on line numbers by setting
/// \c DebugConstraintSolverAttempt. Finally, it can also be automatically
/// enabled for a pre-configured set of expressions on line numbers by setting
/// \c DebugConstraintSolverOnLines.
DebugConstraints = 0x10,
@@ -2374,7 +2374,7 @@ private:
/// The best solution computed so far.
Optional<Score> BestScore;
/// The number of the solution attempt we're looking at.
/// The number of the solution attempts we're looking at.
unsigned SolutionAttempt;
/// Refers to the innermost partial solution scope.
@@ -2521,8 +2521,8 @@ private:
private:
/// The list of constraints that have been retired along the
/// current path, this list is used in LIFO fashion when constraints
/// are added back to the circulation.
/// current path, this list is used in LIFO fashion when
/// constraints are added back to the circulation.
ConstraintList retiredConstraints;
/// The set of constraints which were active at the time of this state
@@ -2821,8 +2821,8 @@ private:
/// able to emit an error message, or false if none of the fixits worked out.
bool applySolutionFixes(const Solution &solution);
/// If there is more than one viable solution,
/// attempt to pick the best solution and remove all of the rest.
/// If there is more than one viable solution, attempt
/// to pick the best solution and remove all of the rest.
///
/// \param solutions The set of solutions to filter.
///
@@ -2865,7 +2865,7 @@ private:
void addKeyPathApplicationRootConstraint(Type root, ConstraintLocatorBuilder locator);
public:
/// Lookup for a member with the given name in the given base type.
/// Lookup for a member with the given name which is in the given base type.
///
/// This routine caches the results of member lookups in the top constraint
/// system, to avoid.
@@ -3955,7 +3955,7 @@ public:
}
private:
/// Adjust the constraint system to accomodate the given selected overload, and
/// Adjust the constraint system to accommodate the given selected overload, and
/// recompute the type of the referenced declaration.
///
/// \returns a pair containing the adjusted opened type of a reference to

View File

@@ -57,7 +57,7 @@ STATISTIC(NumSROAArguments, "Number of aggregate argument levels split by "
//===----------------------------------------------------------------------===//
/// dominatorBasedSimplify iterates between dominator based simplification of
/// terminator branch condition values and cfg simplification. This is the
/// terminator branch condition values and CFG simplification. This is the
/// maximum number of iterations we run. The number is the maximum number of
/// iterations encountered when compiling the stdlib on April 2 2015.
///
@@ -386,8 +386,8 @@ bool SimplifyCFG::threadEdge(const ThreadInfo &ti) {
return true;
}
/// Give a cond_br or switch_enum instruction and one successor block return
/// true if we can infer the value of the condition/enum along the edge to this
/// Give a cond_br or switch_enum instruction and one successor block returns
/// true if we can infer the value of the condition/enum along the edge to these
/// successor blocks.
static bool isKnownEdgeValue(TermInst *Term, SILBasicBlock *SuccBB,
EnumElementDecl *&EnumCase) {
@@ -1045,7 +1045,7 @@ bool SimplifyCFG::tryJumpThreading(BranchInst *BI) {
// Jump threading only makes sense if there is an argument on the branch
// (which is reacted on in the DestBB), or if this goes through a memory
// location (switch_enum_addr is the only adress-instruction which we
// location (switch_enum_addr is the only address-instruction which we
// currently handle).
if (BI->getArgs().empty() && !isa<SwitchEnumAddrInst>(destTerminator))
return false;
@@ -1976,7 +1976,7 @@ static bool containsOnlyObjMethodCallOnOptional(SILValue optionalValue,
}
/// Check that all that noneBB does is forwarding none.
/// The only other allowed operation are ref count operations.
/// The only other allowed operations are ref count operations.
static bool onlyForwardsNone(SILBasicBlock *noneBB, SILBasicBlock *someBB,
SwitchEnumInst *SEI) {
// It all the basic blocks leading up to the ultimate block we only expect
@@ -2054,7 +2054,7 @@ static bool hasSameUltimateSuccessor(SILBasicBlock *noneBB, SILBasicBlock *someB
// Otherwise, lets begin a traversal along the successors of noneSuccessorBB,
// searching for someSuccessorBB, being careful to only allow for blocks to be
// visited once. This enables us to guarantee that there are not any loops or
// visited once. This enables us to guarantee that there no loops or
// any sub-diamonds in the part of the CFG we are traversing. This /does/
// allow for side-entrances to the region from blocks not reachable from
// noneSuccessorBB. See function level comment above.
@@ -4048,13 +4048,13 @@ bool SimplifyCFG::simplifyProgramTerminationBlock(SILBasicBlock *BB) {
//
// TODO: should we use ProgramTerminationAnalysis ?. The reason we do not
// use the analysis is because the CFG is likely to be invalidated right
// after this pass, o we do not really get the benefit of reusing the
// after this pass, that's why we do not really get the benefit of reusing the
// computation for the next iteration of the pass.
if (!isARCInertTrapBB(BB))
return false;
// This is going to be the last basic block this program is going to execute
// and this block is inert from the ARC's prospective, no point to do any
// and this block is inert from the ARC's prospective,so there's no point to do any
// releases at this point.
bool Changed = false;
llvm::SmallPtrSet<SILInstruction *, 4> InstsToRemove;

View File

@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
//
// This file implements diagnostics for constraint system.
// This file implements diagnostics for the constraint system.
//
//===----------------------------------------------------------------------===//
@@ -2790,7 +2790,7 @@ bool ContextualFailure::diagnoseConversionToBool() const {
// Check if we need the inner parentheses.
// Technically we only need them if there's something in 'expr' with
// lower precedence than '!=', but the code actually comes out nicer
// in most cases with parens on anything non-trivial.
// in most cases with parens on anything that is non-trivial.
if (anchor->canAppendPostfixExpression()) {
prefix = prefix.drop_back();
suffix = suffix.drop_front();
@@ -4535,7 +4535,7 @@ bool MissingArgumentsFailure::diagnoseSingleMissingArgument() const {
// corresponding to the missing argument doesn't support a trailing closure,
// don't provide a Fix-It.
// FIXME: It's possible to parenthesize and relabel the argument list to
// accomodate this, but it's tricky.
// accommodate this, but it's tricky.
bool shouldEmitFixIt =
!(insertingTrailingClosure && !paramAcceptsTrailingClosure);

View File

@@ -125,7 +125,7 @@ static void intervalContainingPowerOf10_Binary32(int p, uint64_t *lower, uint64_
#endif
//
// Helpers used by binary32, binary64, float80, and binary128
// Helpers used by binary32, binary64, float80, and binary128.
//
#if SWIFT_DTOA_BINARY32_SUPPORT || SWIFT_DTOA_BINARY64_SUPPORT || SWIFT_DTOA_FLOAT80_SUPPORT || SWIFT_DTOA_BINARY128_SUPPORT
@@ -782,7 +782,7 @@ size_t swift_dtoa_optimal_binary64_p(const void *d, char *dest, size_t length)
// bias. That's because they treat the significand as a
// fixed-point number with one bit (the hidden bit) integer
// portion. The logic here reconstructs the significand as a
// pure fraction, so we need to accomodate that when
// pure fraction, so we need to accommodate that when
// reconstructing the binary exponent.
static const int64_t exponentBias = (1 << (exponentBitCount - 1)) - 2; // 1022
@@ -1202,7 +1202,8 @@ size_t swift_dtoa_optimal_binary64_p(const void *d, char *dest, size_t length)
// value 0.1234 and computed u = 0.1257, l = 0.1211. The above
// digit generation works with `u`, so produces 0.125. But the
// values 0.122, 0.123, and 0.124 are just as short and 0.123 is
// the best choice, since it's closest to the original value.
// therefore the best choice, since it's closest to the original
// value.
// We know delta and t are both less than 10.0 here, so we can
// shed some excess integer bits to simplify the following:

View File

@@ -2,7 +2,7 @@
// REQUIRES: asan_runtime
// UNSUPPORTED: windows
// Check with recovery instrumentation and runtime option to continue execution.
// Check with recovery instrumentation and the runtime option to continue execution.
// RUN: %target-swiftc_driver %s -target %sanitizers-target-triple -g -sanitize=address -sanitize-recover=address -import-objc-header %S/asan_interface.h -emit-ir -o %t.asan_recover.ll
// RUN: %FileCheck -check-prefix=CHECK-IR -input-file=%t.asan_recover.ll %s
// RUN: %target-swiftc_driver %s -target %sanitizers-target-triple -g -sanitize=address -sanitize-recover=address -import-objc-header %S/asan_interface.h -o %t_asan_recover
@@ -29,7 +29,7 @@
// CHECK-IR-NOT: call {{.+}} @memcpy
// FIXME: We need this so we can flush stdout but this won't
// work on other Platforms (e.g. Windows).
// work on other Platforms (e.g. Microsoft Windows).
#if canImport(Glibc)
import Glibc
#else
@@ -66,7 +66,7 @@ __asan_poison_memory_region(UnsafeMutableRawPointer(x), size)
// print(x)
// ```
//
// However, this generated code that called into memcpy rather than performing
// However, this generated code that's called into memcpy rather than performing
// a direct read which meant that ASan caught an issue via its interceptors
// rather than from instrumentation, which does not test the right thing here.
//
@@ -88,7 +88,7 @@ fflush(stdout)
// CHECK-RECOVER-STDOUT: Read first element:0
// Second error
// NOTE: Very loose regex is to accomodate if name demangling
// NOTE: Very loose regex is to accommodate if name demangling
// fails. rdar://problem/57235673
// CHECK-RECOVER-STDERR: AddressSanitizer: use-after-poison
// CHECK-RECOVER-STDERR: #0 0x{{.+}} in {{.*}}foo{{.*}}