Skip to content

Spelling lib migrator #58574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Migrator/APIDiffMigratorPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ struct APIDiffMigratorPass : public ASTMigratorPass, public SourceEntityWalker {
if (Params.size() <= Idx)
return;

// Get the internal name of the changed paramter.
// Get the internal name of the changed parameter.
auto VariableName = Params[Idx]->getParameterName().str();

// Insert the helper function to convert the type back to raw types.
Expand Down Expand Up @@ -1432,7 +1432,7 @@ struct APIDiffMigratorPass : public ASTMigratorPass, public SourceEntityWalker {
if (auto *VD = dyn_cast<VarDecl>(D)) {
for (auto *Item: getRelatedDiffItems(VD)) {
if (auto *CD = dyn_cast<CommonDiffItem>(Item)) {
// If the overriden property has been renamed, we should rename
// If the overridden property has been renamed, we should rename
// this property decl as well.
if (CD->isRename() && VD->getNameLoc().isValid()) {
Editor.replaceToken(VD->getNameLoc(), CD->getNewName());
Expand Down
2 changes: 1 addition & 1 deletion lib/Migrator/Diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ class diff_match_patch {
static string_t diff_linesToCharsMunge(const string_t &text, std::map<LinePtr, size_t> &lineHash) {
string_t chars;
// Walk the text, pulling out a substring for each line.
// text.split('\n') would would temporarily double our memory footprint.
// text.split('\n') would temporarily double our memory footprint.
// Modifying text would create many large strings to garbage collect.
typename string_t::size_type lineLen;
for (typename string_t::const_pointer lineStart = text.c_str(), textEnd = lineStart + text.size(); lineStart < textEnd; lineStart += lineLen + 1) {
Expand Down