Skip to content

Conversation

anutosh491
Copy link
Collaborator

@anutosh491 anutosh491 commented Apr 1, 2025

Hey @vgvassilev,

If you remember, we were discussing the changes needed to handle the LLVMargs from FrontendOpts for clang-repl the other day.

This led to me coming up with this PR on llvm llvm/llvm-project#132670

But I think CppInterOp does take some inspiration from the above in the past and has added a block for handling the LLVM args

// Honor -mllvm.
//
// FIXME: Remove this, one day.
// This should happen AFTER plugins have been loaded!
const CompilerInstance* Clang = I->getCI();
if (!Clang->getFrontendOpts().LLVMArgs.empty()) {
unsigned NumArgs = Clang->getFrontendOpts().LLVMArgs.size();
auto Args = std::make_unique<const char*[]>(NumArgs + 2);
Args[0] = "clang (LLVM option parsing)";
for (unsigned i = 0; i != NumArgs; ++i)
Args[i + 1] = Clang->getFrontendOpts().LLVMArgs[i].c_str();
Args[NumArgs + 1] = nullptr;
llvm::cl::ParseCommandLineOptions(NumArgs + 1, Args.get());
}

Hence we should be able to process any exception handling case for our emscripten build through cppinterop (though clang-repl in the browser itself won't be able to handle these)

This adds a simple test case for the same. Which we can possibly remove along with the above code block .... once this in completely done in clang-repl itself (possibly like how I tried to achieve it in the above linked PR)

Copy link
Contributor

github-actions bot commented Apr 1, 2025

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
Copy link
Contributor

github-actions bot commented Apr 1, 2025

clang-tidy review says "All clean, LGTM! 👍"

Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.94%. Comparing base (e1ace51) to head (cdf42b9).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #543   +/-   ##
=======================================
  Coverage   75.94%   75.94%           
=======================================
  Files           9        9           
  Lines        3646     3646           
=======================================
  Hits         2769     2769           
  Misses        877      877           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anutosh491
Copy link
Collaborator Author

The fail test look completely unrelated

The test I added for the emscripten build passes here (https://github.com/compiler-research/CppInterOp/actions/runs/14192033343/job/39758739024?pr=543#step:8:569)

@anutosh491
Copy link
Collaborator Author

Hi,

I realize some cppyy based tests are failing. Not sure what's going wrong but possibly @Vipul-Cariappa can help me out here ?

@mcbarton
Copy link
Collaborator

mcbarton commented Apr 2, 2025

Hi,

I realize some cppyy based tests are failing. Not sure what's going wrong but possibly @Vipul-Cariappa can help me out here ?

Hi @anutosh491 The cppyy jobs should pass again once compiler-research/cppyy#140 is in. There is some work being done to get some extra cppyy tests passing.

@aaronj0
Copy link
Collaborator

aaronj0 commented Apr 2, 2025

Hi,

I realize some cppyy based tests are failing. Not sure what's going wrong but possibly @Vipul-Cariappa can help me out here ?

Sorry about those tests! Should be ready in a couple of minutes and a rerun can be triggered

Copy link
Contributor

github-actions bot commented Apr 2, 2025

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@aaronj0 aaronj0 left a comment

Choose a reason for hiding this comment

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

LGTM! One minor comment: Would be good to add the test to the end of the file

@vgvassilev vgvassilev merged commit 3258584 into compiler-research:main Apr 2, 2025
125 of 143 checks passed
@anutosh491 anutosh491 deleted the exception_handling branch April 2, 2025 12:22
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.

4 participants