Skip to content

gh-133228: c-analyzer clang preprocessor #133229

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 5 commits into
base: main
Choose a base branch
from

Conversation

dg-pb
Copy link
Contributor

@dg-pb dg-pb commented Apr 30, 2025

Few minor deviations from gcc, but all seems to be working correctly.

Changes (apart from main implementation):

  1. MAX_SIZES additions for 2 files were required.
  2. Added a fix for [n]curses.h failures on clang (gcc also includes both markerlines - curses.h and ncurses.h, but a bit differently, thus passes)
  3. Added couple of global ignores that were failing on clang (don't know why they weren't on gcc)

import re

from . import common as _common
from . import gcc as _gcc
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to move the parts used from gcc in this new clang module to common?

Copy link
Contributor Author

@dg-pb dg-pb May 1, 2025

Choose a reason for hiding this comment

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

It would, but I would leave this for when this is stable. And would need to look into it a bit more to get a sense what can be common and what is best to be left separate.

For now I would not rather mess with gcc.
And will add a warning that this is experimental with a list of skipped files.

Any chance you are running osx and could check if it works for you?

Copy link
Member

Choose a reason for hiding this comment

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

Windows, sorry.

@dg-pb
Copy link
Contributor Author

dg-pb commented May 1, 2025

In addition getting the following 2 errors:

Modules/socketmodule.c - netdb_lock not supported (typespec) static PyThread_type_lock

Python/bootstrap_hash.c py_getentropy getentropy_works not supported (mutable) static int

@dg-pb
Copy link
Contributor Author

dg-pb commented May 2, 2025

In addition getting the following 2 errors:

Modules/socketmodule.c - netdb_lock not supported (typespec) static PyThread_type_lock

Python/bootstrap_hash.c py_getentropy getentropy_works not supported (mutable) static int

Included these 2 into tsvs. Not sure why they were not failing in tests. Can only run clang, not gcc, so can not tell.

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

Successfully merging this pull request may close these issues.

2 participants