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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to