[clang] [clang][sema] Suppress unsupported 128-bit mode attribute diagnostic for OpenMP device compilation (PR #214497)

Nick Sarnie via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 6 07:17:43 PDT 2026


================
@@ -5226,7 +5226,8 @@ void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI,
   if (NewElemTy.isNull()) {
     // Only emit diagnostic on host for 128-bit mode attribute
     if (!(DestWidth == 128 &&
-          (getLangOpts().CUDAIsDevice || getLangOpts().SYCLIsDevice)))
+          (getLangOpts().CUDAIsDevice || getLangOpts().SYCLIsDevice ||
----------------
sarnex wrote:

can we instead use `getLangOpts().isTargetDevice()`? it does exactly this already:


https://github.com/llvm/llvm-project/pull/214497


More information about the cfe-commits mailing list