-
Notifications
You must be signed in to change notification settings - Fork 790
[SYCL] Functions with variadic arguments should not get a diagnostic … #324
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
21c476a
to
5d8331f
Compare
Thanks for the approval, Slava! (I don't have merge permissions. Can you or Alexey please do the merge?) |
Also, Else after return is against llvm coding conventions
From: Alexey Bader [mailto:[email protected]]
Sent: Wednesday, July 17, 2019 8:04 AM
To: intel/llvm <[email protected]>
Cc: Blower, Melanie <[email protected]>; Review requested <[email protected]>
Subject: Re: [intel/llvm] [SYCL] Functions with variadic arguments should not get a diagnostic … (#324)
@bader requested changes on this pull request.
________________________________
In clang/lib/Sema/SemaType.cpp<#324 (comment)>:
@@ -7024,13 +7024,12 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr,
<< (int)Sema::CallingConventionIgnoredReason::VariadicFunction;
attr.setInvalid();
- if (S.getLangOpts().SYCLIsDevice) {
- S.SYCLDiagIfDeviceCode(attr.getLoc(), diag::err_cconv_varargs)
- << FunctionType::getNameForCallConv(CC);
- return true;
- } else
- return S.Diag(attr.getLoc(), diag::err_cconv_varargs)
- << FunctionType::getNameForCallConv(CC);
+ // Disable this diagnostic for SYCL
SYCL 1.2.1 specification explicitly prohibits variadic functions:
"No variadic functions are allowed to be called in a SYCL kernel or any functions called by the kernel."
NOTE: variadic functions are allowed in the "host code".
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub<#324?email_source=notifications&email_token=ACLOUBW2FHUI5EOYDQAVQHDP74DDPA5CNFSM4IEFZEY2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB6WMA3A#pullrequestreview-262979692>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACLOUBXC3KWZ3T3JOZZE3JTP74DDPANCNFSM4IEFZEYQ>.
|
There is no "else after return" in the code I added new. |
If you are going to upload another patch will you please correct the else after return, that will save some work in the future. |
I am not sure which "else after return" you are talking about. If you are talking about the part I removed, that will stay removed. My new changes will most likely be an addition to another file. (i.e. this particular change that I uploaded will remain unchanged.) |
5d8331f
to
df9f1f5
Compare
df9f1f5
to
4a7be16
Compare
…about calling convention Instead they should be diagnosed at the point of call. Signed-off-by: Premanand M Rao <[email protected]>
4a7be16
to
7966933
Compare
…about calling convention
Signed-off-by: Premanand M Rao [email protected]