Skip to content

feature: introduce clang frontend to detect illegal usage of C++ proteus functions - #540

Merged
johnbowen42 merged 13 commits into
mainfrom
feature/clang-frontend
Oct 8, 2026
Merged

johnbowen42 merged 13 commits into
mainfrom
feature/clang-frontend

Conversation

@johnbowen42

Copy link
Copy Markdown
Collaborator

The goal of the feature is to gracefully exit when a user illegally uses proteus::register_lambda or proteus::jit_variable. There are a variety of error messages attempting to handle these cases within Proteus's LLVM plugin pass, but this is not an ideal way to catch the misuses as they result in compiler crashes

@johnbowen42
johnbowen42 marked this pull request as draft September 30, 2026 22:34
@davidbeckingsale

Copy link
Copy Markdown
Member

This is a great idea. Looks good to me.

@johnbowen42

johnbowen42 commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

resolves #530

)
endif()

add_dependencies(${target} ProteusPass ProteusASTChecker)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

NB: this dependency ordering is sometimes needed by downstream projects, so even though this feature does not require ProteusPass dependency explicitly, some downstream projects will benefit from this

@johnbowen42
johnbowen42 marked this pull request as ready for review October 1, 2026 19:40
@johnbowen42

Copy link
Copy Markdown
Collaborator Author

@ZwFink What do you think of this? You have more experience with the ClangAST than any of us

@ZwFink

ZwFink commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

@lc-hubcast restart pipeline

@lc-hubcast

lc-hubcast Bot commented Oct 1, 2026

Copy link
Copy Markdown

I've started a new pipeline for you!

@ZwFink
ZwFink force-pushed the feature/clang-frontend branch from 902e31a to fc8f101 Compare October 6, 2026 00:56
@ZwFink

ZwFink commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

@lc-hubcast restart failed jobs

@lc-hubcast

lc-hubcast Bot commented Oct 7, 2026

Copy link
Copy Markdown

I've retried any failed jobs in the pipeline!

@ZwFink ZwFink left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@johnbowen42
johnbowen42 merged commit bb7038f into main Oct 8, 2026
62 checks passed
@johnbowen42
johnbowen42 deleted the feature/clang-frontend branch October 8, 2026 20:20
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.

3 participants