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

Allow -x c++ to work #432

Closed
wants to merge 1 commit into from
Closed

Allow -x c++ to work #432

wants to merge 1 commit into from

Conversation

vchuravy
Copy link
Collaborator

No description provided.

@vchuravy
Copy link
Collaborator Author

Attempt at fixing #430 (comment)

@vchuravy
Copy link
Collaborator Author

Struggles still with:

/// Severity of a diagnostic.
enum MlirDiagnosticSeverity {
  MlirDiagnosticError,
  MlirDiagnosticWarning,
  MlirDiagnosticNote,
  MlirDiagnosticRemark
};
typedef enum MlirDiagnosticSeverity MlirDiagnosticSeverity;

@vchuravy
Copy link
Collaborator Author

Motivating PR in MLIR.jl JuliaLLVM/MLIR.jl#10, but of course kinda ugly since we suddenly have to deal with new things...

@Gnimuc
Copy link
Member

Gnimuc commented May 27, 2023

Allowing -x c++ is not enough for generic C++ support, we need to add C++ standard library and system headers like what has been done in ClangCompiler.jl: https://github.com/Gnimuc/ClangCompiler.jl/blob/master/src/platform/system.jl

@Gnimuc
Copy link
Member

Gnimuc commented May 27, 2023

Struggles still with:

/// Severity of a diagnostic.
enum MlirDiagnosticSeverity {
  MlirDiagnosticError,
  MlirDiagnosticWarning,
  MlirDiagnosticNote,
  MlirDiagnosticRemark
};
typedef enum MlirDiagnosticSeverity MlirDiagnosticSeverity;

Is this problem caused by the audit step?

I added an option no_audit in this PR which might be helpful...

@vchuravy
Copy link
Collaborator Author

is not enough for generic C++ support, we need to add C++ standard library and system headers like what has been done in ClangCompiler.jl

Yeah I don't need generic C++ support, more C headers written by C++ people... E.g. MLIR headers contain some C++-ism

@vchuravy
Copy link
Collaborator Author

Is this problem caused by the audit step?

No the issue is that C++ mode changes the representation of some of the Clang nodes.
I needed #435 to sucesfully parse the MLIR headers.

Gnimuc added a commit that referenced this pull request Apr 7, 2024
…, `CLUsingDeclaration`(skip for now)

cherry-pick partial of #432, #435

Co-Authored-By: Valentin Churavy <v.churavy@gmail.com>
@Gnimuc Gnimuc added this to the release-0.18.0 milestone Apr 7, 2024
@Gnimuc Gnimuc added the c++ label Apr 7, 2024
@Gnimuc Gnimuc closed this in 852ed6f Apr 8, 2024
@Gnimuc Gnimuc mentioned this pull request Apr 8, 2024
@vchuravy vchuravy deleted the vc/cxx_parse branch April 9, 2024 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants