================
@@ -761,6 +803,17 @@ ExprResult Sema::ImpCastExprToType(Expr *E, QualType Ty,
     }
   }
 
+  // FIXME: Doesn't include C89, so this warning isn't emitted when passing
+  // `std=c89`.
+  auto isC = getLangOpts().C99 || getLangOpts().C11 || getLangOpts().C17 ||
----------------
PhilippRados wrote:

It does make sense for C++. It should be issued for both C and C++ (I'm not 
proficient in OpenMP/Cuda so I can't really talk for those).

I wanted to clarify that with the `if (getLangOpts().CPlusPlus || isC) && 
!getLangOpts().ObjC) {...}` line, that this would actually just affect C and 
C++ and none of the other languages.

Of course I could also just do `!isCuda && !isOpenMP && !isObjC` so that just C 
and C++ remain but that seems a little verbose.

https://github.com/llvm/llvm-project/pull/115234
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to