[Openmp-commits] [PATCH] D77918: [OpenMP] Avoid crash in preparation for diagnose of unsupported type
Mariya Podchishchaeva via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Apr 14 10:11:17 PDT 2020
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
More information about the Openmp-commits
mailing list