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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to