nullptr.cpp updated this revision to Diff 288894.
nullptr.cpp added a comment.

Fix by changing the loop condition to `Level > 0`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86858/new/

https://reviews.llvm.org/D86858

Files:
  clang/lib/Sema/SemaOpenMP.cpp


Index: clang/lib/Sema/SemaOpenMP.cpp
===================================================================
--- clang/lib/Sema/SemaOpenMP.cpp
+++ 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;


Index: clang/lib/Sema/SemaOpenMP.cpp
===================================================================
--- clang/lib/Sema/SemaOpenMP.cpp
+++ 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;
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to