Skip to content

[SYCL] Refactor the way we diagnose some SYCL attributes; mostly NFC #3147

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

Merged
merged 2 commits into from
Feb 3, 2021

Conversation

AaronBallman
Copy link
Contributor

This removes a helper method from some SYCL attributes which would
provide the name of the attribute. This code wasn't needed because the
diagnostics engine already knows how to print attributes by name.

While making this change, some diagnostics are now properly quoted when
they weren't previously. As a drive-by, I also noticed that the location
of the diagnostics was wrong (it was diagnosing the start of the
attribute range rather than the problematic attribute). This means that
duplicate or conflicting attributes should be warning about the second
attribute (the one causing the conflict) rather than the first
attribute.

This removes a helper method from some SYCL attributes which would
provide the name of the attribute. This code wasn't needed because the
diagnostics engine already knows how to print attributes by name.

While making this change, some diagnostics are now properly quoted when
they weren't previously. As a drive-by, I also noticed that the location
of the diagnostics was wrong (it was diagnosing the start of the
attribute range rather than the problematic attribute). This means that
duplicate or conflicting attributes should be warning about the second
attribute (the one causing the conflict) rather than the first
attribute.
Copy link
Contributor

@premanandrao premanandrao left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

Copy link
Contributor

@smanna12 smanna12 left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM!

@bader
Copy link
Contributor

bader commented Feb 3, 2021

Nice change!

@bader bader merged commit 24d852b into intel:sycl Feb 3, 2021
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.

5 participants