[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 7 09:44:44 PST 2024


================
@@ -21124,6 +21124,8 @@ Sema::ActOnOpenMPDependClause(const OMPDependClause::DependDataTy &Data,
               ExprTy = ATy->getElementType();
             else
               ExprTy = BaseType->getPointeeType();
+            if (ExprTy.isNull())
+              continue;
----------------
shiltian wrote:

I'm not sure to `continue` here is a good idea. Probably you want `return nullptr;`.

https://github.com/llvm/llvm-project/pull/81015


More information about the cfe-commits mailing list