rjmccall added inline comments.
================ Comment at: clang/include/clang/Sema/Sema.h:12248 + /// SYCLDiagIfDeviceCode(Loc, diag::err_type_unsupported) << "__float128"; + DeviceDiagBuilder SYCLDiagIfDeviceCode(SourceLocation Loc, unsigned DiagID); + ---------------- Will this collect notes associated with the diagnostic correctly? ================ Comment at: clang/lib/Sema/SemaAvailability.cpp:479 + case UnavailableAttr::IR_SYCLForbiddenType: + diag_available_here = diag::err_type_unsupported; + break; ---------------- All of the other cases are setting this to a note, not an error, so I suspect this will read wrong. ================ Comment at: clang/lib/Sema/SemaAvailability.cpp:534 + if (S.getLangOpts().SYCLIsDevice) + S.SYCLDiagIfDeviceCode(Loc, diag) << ReferringDecl; + else ---------------- Are you sure you want to be applying this to all of the possible diagnostics here, rather than just for SYCLForbiddenType unavailable attributes? ================ Comment at: clang/lib/Sema/SemaDecl.cpp:18030 + if (LangOpts.SYCLIsDevice && FD->hasAttr<SYCLKernelAttr>()) + return FunctionEmissionStatus::Emitted; + ---------------- So you want to emit it for the definition in addition to emitting it for specific specializations? ================ Comment at: clang/lib/Sema/SemaDeclAttr.cpp:7771 + return true; + } + ---------------- I wonder if it's reasonable to treat all forbidden types the same here or if we want different functions for the ARC and SYCL use cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74387/new/ https://reviews.llvm.org/D74387 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits