[Openmp-commits] [PATCH] D91980: [OpenMP] Add initial support for `omp [begin/end] assumes`
Alexey Bataev via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Dec 4 09:56:27 PST 2020
ABataev added inline comments.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:5940
+void Sema::ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(Decl *D) {
+ FunctionDecl *FD = nullptr;
+ if (auto *UTemplDecl = dyn_cast<FunctionTemplateDecl>(D))
----------------
You can also check if the decl is invalid here
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:5945-5946
+ FD = cast<FunctionDecl>(D);
+ if (!FD)
+ return;
+
----------------
Looks like `FD==nullptr` is impossible here. Or `UTemplDecl->getTemplatedDecl()` can return `nullptr`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91980/new/
https://reviews.llvm.org/D91980
More information about the Openmp-commits
mailing list