diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -2430,7 +2430,7 @@ DSAStackTy::DSAVarData DVar = DSAStack->getImplicitDSA(D, Level); if (DVar.CKind != OMPC_shared) return true; - } while (Level >= 0); + } while (Level > 0); } } return true;