Skip to content

Fix typos in repo #556

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mcbarton
Copy link
Collaborator

@mcbarton mcbarton commented Apr 8, 2025

Description

Please include a summary of changes, motivation and context for this PR.

There was many typos in CppInterOp including in the names of variables and functions in the code. This PR fixes these typos.

A similar PR fixing typos in xeus-cpp is here compiler-research/xeus-cpp#285

Fixes # (issue)

Type of change

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Requires documentation updates

Testing

Please describe the test(s) that you added and ran to verify your changes.

Checklist

  • I have read the contribution guide recently

Copy link

codecov bot commented Apr 8, 2025

Codecov Report

Attention: Patch coverage is 28.57143% with 10 lines in your changes missing coverage. Please review.

Project coverage is 75.94%. Comparing base (58be79c) to head (3691ffa).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/Interpreter/Paths.cpp 20.00% 8 Missing ⚠️
lib/Interpreter/DynamicLibraryManagerSymbol.cpp 33.33% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #556   +/-   ##
=======================================
  Coverage   75.94%   75.94%           
=======================================
  Files           9        9           
  Lines        3646     3646           
=======================================
  Hits         2769     2769           
  Misses        877      877           
Files with missing lines Coverage Δ
include/clang/Interpreter/CppInterOp.h 96.29% <ø> (ø)
lib/Interpreter/Compatibility.h 90.09% <ø> (ø)
lib/Interpreter/CppInterOp.cpp 83.88% <ø> (ø)
lib/Interpreter/CppInterOpInterpreter.h 80.32% <ø> (ø)
lib/Interpreter/DynamicLibraryManager.cpp 73.46% <100.00%> (ø)
lib/Interpreter/DynamicLibraryManager.h 90.00% <ø> (ø)
lib/Interpreter/DynamicLibraryManagerSymbol.cpp 68.53% <33.33%> (ø)
lib/Interpreter/Paths.cpp 55.19% <20.00%> (ø)
Files with missing lines Coverage Δ
include/clang/Interpreter/CppInterOp.h 96.29% <ø> (ø)
lib/Interpreter/Compatibility.h 90.09% <ø> (ø)
lib/Interpreter/CppInterOp.cpp 83.88% <ø> (ø)
lib/Interpreter/CppInterOpInterpreter.h 80.32% <ø> (ø)
lib/Interpreter/DynamicLibraryManager.cpp 73.46% <100.00%> (ø)
lib/Interpreter/DynamicLibraryManager.h 90.00% <ø> (ø)
lib/Interpreter/DynamicLibraryManagerSymbol.cpp 68.53% <33.33%> (ø)
lib/Interpreter/Paths.cpp 55.19% <20.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@@ -606,10 +606,12 @@
Deps.push_back(Data + Dyn.d_un.d_val);
break;
case ELF::DT_RPATH:
SplitPaths(Data + Dyn.d_un.d_val, RPath, utils::kAllowNonExistant, Cpp::utils::platform::kEnvDelim, false);
SplitPaths(Data + Dyn.d_un.d_val, RPath, utils::kAllowNonExistent,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access]

          SplitPaths(Data + Dyn.d_un.d_val, RPath, utils::kAllowNonExistent,
                                     ^

break;
case ELF::DT_RUNPATH:
SplitPaths(Data + Dyn.d_un.d_val, RunPath, utils::kAllowNonExistant, Cpp::utils::platform::kEnvDelim, false);
SplitPaths(Data + Dyn.d_un.d_val, RunPath, utils::kAllowNonExistent,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access]

          SplitPaths(Data + Dyn.d_un.d_val, RunPath, utils::kAllowNonExistent,
                                     ^

Paths.push_back(Split.first);
else if (Verbose)
LogNonExistantDirectory(Split.first);
LogNonExistentDirectory(Split.first);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not use 'else' after 'return' [llvm-else-after-return]

Suggested change
LogNonExistentDirectory(Split.first);
} if (Mode == kAllowNonExistent)
Paths.push_back(Split.first);
else if (Verbose)
LogNonExistentDirectory(Split.first);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's probably a good warning to fix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried applying this suggestion, and it broke the ci jobs (also caused another lot of review comments). Reverted.

@mcbarton mcbarton requested a review from Vipul-Cariappa April 8, 2025 20:32
Copy link
Collaborator

@Vipul-Cariappa Vipul-Cariappa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Looks like mistakes I would do.

Could you check why codecov is complaining?
Looks like the patch coverage is bad, but project converge between main and this PR is the same.

I am approving this. But please check and cross-check that no tests fail.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

}
return false;
} else if (Mode == kAllowNonExistant)
} else if (Mode == kAllowNonExistent)
Paths.push_back(Split.first);
else if (Verbose)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not use 'else' after 'return' [llvm-else-after-return]

Suggested change
else if (Verbose)
} if (Mode == kAllowNonExistent)
Paths.push_back(Split.first);
else if (Verbose)

@@ -311,10 +314,10 @@
if (!PathStr.empty()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: expected unqualified-id [clang-diagnostic-error]

  if (!PathStr.empty()) {
  ^

@@ -331,7 +334,7 @@

llvm::SmallVector<llvm::StringRef, 10> Paths;
if (Delim && *Delim)
SplitPaths(PathStr, Paths, kAllowNonExistant, Delim, HOpts.Verbose);
SplitPaths(PathStr, Paths, kAllowNonExistent, Delim, HOpts.Verbose);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: use of undeclared identifier 'kAllowNonExistent'; did you mean 'utils::kAllowNonExistent'? [clang-diagnostic-error]

Suggested change
SplitPaths(PathStr, Paths, kAllowNonExistent, Delim, HOpts.Verbose);
SplitPaths(PathStr, Paths, utils::kAllowNonExistent, Delim, HOpts.Verbose);
Additional context

lib/Interpreter/Paths.h:64: 'utils::kAllowNonExistent' declared here

  kAllowNonExistent  ///< Add all paths whether they exist or not
  ^

@mcbarton
Copy link
Collaborator Author

@vgvassilev Is it ok for me merge this PR in, despite #556 (comment) not being done, given the objective of this PR was just to fix typos?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants