-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix broken simplecpp builds with libc++ #8015
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
base: main
Are you sure you want to change the base?
Conversation
|
danmar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.. @firewave ?
|
It would be helpful if the error which is fixed by this could be provided. Also I think this has nothing to do with libc++ but actually with a compiler which bypasses the standard version we are setting. I think the "proper" fix would be #7962. |
I am not able to reproduce it, so either your compiler is misbehaving or you have CMake misconfigured. |
|
This is the error I see: Its calling the constructor that takes a pointer and size: Line 877 in bdf2f42
but the constructor is not available when cppcheck/externals/simplecpp/simplecpp.h Line 60 in bdf2f42
Since this is c++17, string_view is available but span is not, so this macro doesnt get defined.
I agree but since this fails to build completely, I think this can be merged now. |
|
Can we merge this in? As I cannot build cppcheck locally on my mac. |
|
This looks related to https://trac.cppcheck.net/ticket/14267 |
|
This has been "superseded" by #7962. |
Then the tests that C++17 actually builds also need to be moved here (and it doesn't with That other PR will be the final one before we release so it is currently my only priority. It is also ready now except for looking into your feedback. |
this is BAD. :-( |
I have a macincloud account. Unfortunately I don't have cmake and don't have permissions to install it. If you share the simplecpp.cpp compilation command from compile_commands.json and I can see if I can reproduce using that ? |



Cppcheck passes a pointer and size to
simplecpp:TokenList, so we need those APIs enabled even if there isstring_viewandspan.