Skip to content

Conversation

mizvekov
Copy link
Collaborator

Fixes #904

@mizvekov mizvekov self-assigned this Oct 14, 2025
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 94.77912% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.48%. Comparing base (ba0dcfd) to head (d6a84ab).

Files with missing lines Patch % Lines
src/test/lib/MrDocsCompilationDatabase.cpp 97.61% 4 Missing ⚠️
src/lib/SingleFileDB.hpp 40.00% 3 Missing ⚠️
src/lib/AST/TerminalTypeVisitor.hpp 90.00% 2 Missing ⚠️
src/lib/MrDocsCompilationDatabase.cpp 91.30% 2 Missing ⚠️
src/test/TestRunner.cpp 90.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1069      +/-   ##
===========================================
+ Coverage    85.26%   85.48%   +0.21%     
===========================================
  Files          305      307       +2     
  Lines        23684    23850     +166     
===========================================
+ Hits         20193    20387     +194     
+ Misses        3491     3463      -28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mizvekov mizvekov force-pushed the GH904 branch 5 times, most recently from 87a66f2 to b99b52c Compare October 16, 2025 00:23
@mizvekov mizvekov marked this pull request as ready for review October 16, 2025 13:39
@cppalliance-bot
Copy link

cppalliance-bot commented Oct 16, 2025

An automated preview of the documentation is available at https://1069.mrdocs.prtest2.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2025-10-16 18:30:41 UTC

// ------------------------------------------------------
// Target architecture
// ------------------------------------------------------
constexpr auto is_target_option = [](std::string_view opt) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just out of curiosity, isn't this logic needed anymore (IIRC we had to include this to make it work on macOS), or is this logic reimplemented somewhere else?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not reimplemented. Nothing broke without it as far as I know.

The specific problem for CL-mode here is that, when a target is specified which is different than the MSVC one, then the CL driver ignores a bunch of flags.

{
new_cmdline.emplace_back("-std=c++23");
new_cmdline.emplace_back(
is_clang_cl ? "-std:c++23preview" : "-std=c++23");
Copy link
Collaborator

Choose a reason for hiding this comment

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

I may not recall our previous discussions. Do these flags really mean the same?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The CL-mode driver only supports the "std:" spelling instead of "std=".

Just like MSVC, it interchangeably supports either "-" or "/" as a flag introducer.

And MSVC only recognizes the "c++23preview" option, even in the latest MSVC available in compiler explorer.
Clang follows suit here and doesn't recognize just "c++23" either.

else
{
new_cmdline.emplace_back("-std=c23");
new_cmdline.emplace_back(is_clang_cl ? "-std:c17" : "-std=c23");
Copy link
Collaborator

@alandefreitas alandefreitas Oct 16, 2025

Choose a reason for hiding this comment

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

Do they mean the same thing? Maybe, if that's possible, this case and the case above would be a good case for using that flag that bypasses the clang-cl conversions? Because I'm not sure someone else would understand exactly why these mean the same thing. In other words, it looks like code someone will want to change in passing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No they don't mean the same thing, these are different C standards, we should use the same regardless, I will fix this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah I see, CL doesn't have a c23 option because MSVC doesn't either.

I think we could come up with a different approach here, we could switch to using the latest standard, or maybe not doing this at all, and relying on the user trusting the compiler default, or specifying his own.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed to use the latest standard for both.

Copy link
Collaborator

@alandefreitas alandefreitas left a comment

Choose a reason for hiding this comment

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

This is great. Congrats and thank you! 🎉

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.

--use-system-libc=false is not setting default include paths

4 participants