ABataev added inline comments.
================ Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7487-7497 + auto TNext = Next; + bool IsVarDerefAssoWithArray = false; + if (UO && UO->getOpcode() == UO_Deref) + for (; TNext != CE; TNext = std::next(TNext)) + if (isa<OMPArraySectionExpr>(TNext->getAssociatedExpression()) || + isa<MemberExpr>(TNext->getAssociatedExpression()) || + isa<OMPArrayShapingExpr>(TNext->getAssociatedExpression()) || ---------------- Why need a loop here? Can you somehow merge analysis for (*p) expression with the pointer subscript analysis? ================ Comment at: clang/lib/Sema/SemaOpenMP.cpp:2206-2207 return false; - - if (isa<ArraySubscriptExpr>(EI->getAssociatedExpression()) || - isa<OMPArraySectionExpr>(EI->getAssociatedExpression()) || - isa<MemberExpr>(EI->getAssociatedExpression()) || - isa<OMPArrayShapingExpr>(EI->getAssociatedExpression())) { - IsVariableAssociatedWithSection = true; - // There is nothing more we need to know about this variable. - return true; + auto Next = EI; + for (; Next != EE; Next = std::next(Next)) { + if (isa<ArraySubscriptExpr>(Next->getAssociatedExpression()) || ---------------- Why do you need a loop here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145093/new/ https://reviews.llvm.org/D145093 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits