Skip to content

Conversation

@Fznamznon
Copy link
Contributor

No description provided.

if (!VD->hasGlobalStorage()) {
S.Diag(AL.getLoc(), diag::err_sycl_attibute_cannot_be_applied_here)
<< AL << 0;
S.Diag(AL.getLoc(), diag::err_sycl_attribute_internal_function) << AL << 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, I just took a closer look. Why is a diagnostic about static function/function in anonymous namespace being generated for a variable. This is out of scope of your patch but this looks like incorrect diagnostic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like it was added by @kbobrovs in scope of #1756 . Usage of this diagnostic seems a bit odd and untested.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do I have to fix it?

Copy link
Contributor

Choose a reason for hiding this comment

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

If we'd like to upstream at some point, I'd recommend fixing it. (I think it's in scope for this patch given that the diagnostic quality is being regressed, FWIW).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. register_num has only 'GlobalVar' in subjects list, so it seems the part of the code where this diagnostic was incorrectly used is dead code. Removed.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we'd like to upstream at some point

Go for it! :-)

Copy link
Contributor

@elizabethandrews elizabethandrews left a comment

Choose a reason for hiding this comment

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

Thanks!

@bader bader merged commit 83c897e into intel:sycl Jan 22, 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