Fznamznon added inline comments.
================ Comment at: clang/lib/Sema/SemaOpenMP.cpp:1831 "OpenMP device compilation mode is expected."); + // TODO: Do not check outside of functions for now as the targetDiag below + // requires one. ---------------- Please ignore my comment if it says nonsense. It actually can since I don't know a lot about OpenMP but, looking into `targetDiag`, I would say that underlying function (`diagIfOpenMPDeviceCode` in case of OpenMP device mode) should check that we actually have current function because it does `getCurFunctionDecl()` call. Otherwise any attempt to emit diagnostic in OpenMP device mode using `targetDiag` or `diagIfOpenMPDeviceCode` will fail outside of functions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77918/new/ https://reviews.llvm.org/D77918 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits