-
Notifications
You must be signed in to change notification settings - Fork 769
[NFC][SYCL] Rename poorly named diagnostic #3056
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
Conversation
clang/lib/Sema/SemaDeclAttr.cpp
Outdated
@@ -4832,8 +4832,7 @@ static void handleSYCLDeviceIndirectlyCallableAttr(Sema &S, Decl *D, | |||
static void handleSYCLRegisterNumAttr(Sema &S, Decl *D, const ParsedAttr &AL) { | |||
auto *VD = cast<VarDecl>(D); | |||
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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! :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
No description provided.