[PATCH] D99969: [OpenCL] Accept .rgba in OpenCL 3.0
Sven van Haastregt via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 7 02:09:48 PDT 2021
svenvh added a comment.
In D99969#2671931 <https://reviews.llvm.org/D99969#2671931>, @Anastasia wrote:
> The code formating check reported an issue though...
My bad, will fix before committing.
================
Comment at: clang/lib/Sema/SemaExprMember.cpp:343
if (HasRGBA || (*compStr && IsRGBA(*compStr))) {
- if (S.getLangOpts().OpenCL && S.getLangOpts().OpenCLVersion < 220) {
+ if (S.getLangOpts().OpenCLVersion < 300) {
const char *DiagBegin = HasRGBA ? CompName->getNameStart() : compStr;
----------------
azabaznov wrote:
> Did you forget to check for OpenCL first (`S.getLangOpts().OpenCL`)?
Good point! I thought we didn't need it so I left it out, but when thinking about it again, I believe we do need it, because this code path is not exclusive to OpenCL.
I will add the check back before committing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99969/new/
https://reviews.llvm.org/D99969
More information about the cfe-commits
mailing list