[clang] [Clang][OpenMP] Only defer loop analysis in a dependent context (PR #226805)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 30 01:17:21 PDT 2026
================
@@ -10165,8 +10165,11 @@ static bool checkOpenMPIterationSpace(
HasErrors |= ISC.checkAndSetInc(For ? For->getInc() : CXXFor->getInc());
}
- if (ISC.dependent() || SemaRef.CurContext->isDependentContext() || HasErrors)
+ if (SemaRef.CurContext->isDependentContext() || HasErrors)
return HasErrors;
+ // Outside of a dependent context this only happens during error recovery.
----------------
ojhunt wrote:
This is not true -- I spent some time looking at the block test the LLM introduced in the last revision, blocks do not report a dependent context, which _might_ be a separate bug. Lambdas are semantically similar to blocks but label their operator() as being dependent plus a bunch of other weirdness.
While seeing if I could get problems with lambdas was able to induce a pile of lambda weirdness (https://github.com/llvm/llvm-project/issues/227596)
https://github.com/llvm/llvm-project/pull/226805
More information about the cfe-commits
mailing list