Skip to content
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

libclang 19.1.7 #292

Merged
merged 2 commits into from
Mar 18, 2025
Merged

Conversation

Inkrementator
Copy link
Contributor

Fix anonymous composites in clang 19.1.7

In some new clang versions, the name (cursor.spelling) of anonymous structs,
unions and enums was set to an informative message instead of an empty
string. I.e. "enum (unnamed at [declaration_file.h:48]"

This fixes the errors that happen due to that in a backwards compatible
way, since it still checks for empty spellings.

@Inkrementator Inkrementator changed the title Brokentests Clang 19.1.7 Mar 13, 2025
@Inkrementator Inkrementator changed the title Clang 19.1.7 libclang 19.1.7 Mar 13, 2025
@jacob-carlborg
Copy link
Owner

Could you please rebase your branch. I've fixed the failing CI pipeline.

This didn't seem to be the point of the issue but caused the test to
fail.

Error message:
Common.TranslateAssertError@tests/unit/issues/Issue8.d(14):
Cannot compile source code. Errors:
----------------
 /tmp/dstepZRUFDHDGRGxkGPVu.h:22:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
In some new clang versions, the name (cursor.spelling) of anonymous structs,
unions and enums was set to an informative message instead of an empty
string. I.e. "enum (unnamed at [declaration_file.h:48]"

This fixes the errors that happen due to that in a backwards compatible
way, since it still checks for empty spellings.

This patch is possibly overeager in checking the cursor.spellings for
these new special values, I haven't checked at every single location
whether the check is necessary.
@Inkrementator
Copy link
Contributor Author

done

@jacob-carlborg jacob-carlborg merged commit 1d60272 into jacob-carlborg:master Mar 18, 2025
9 checks passed
@jacob-carlborg
Copy link
Owner

Thanks.

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.

2 participants