[PATCH] D142233: [Clang][OpenMP] Bail out early if `Scope` is nullptr in case of any crash
Shilei Tian via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 20 09:36:20 PST 2023
tianshilei1992 added inline comments.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:7249
// checking for any calls inside an Order region
if (Scope->isOpenMPOrderClauseScope())
Diag(LParenLoc, diag::err_omp_unexpected_call_to_omp_runtime_api);
----------------
ABataev wrote:
> Maybe better to check it here to avoid too early exit?
> ```
> if (Scope && Scope->...)
> ```
But does it make sense to continue? I'm not that sure.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142233/new/
https://reviews.llvm.org/D142233
More information about the cfe-commits
mailing list