Author: hokein
Date: Thu Apr 27 07:22:33 2017
New Revision: 301536

URL: http://llvm.org/viewvc/llvm-project?rev=301536&view=rev
Log:
Fix asan failures on OpenMP.

Modified:
    cfe/trunk/lib/Sema/SemaOpenMP.cpp

Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=301536&r1=301535&r2=301536&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Thu Apr 27 07:22:33 2017
@@ -833,6 +833,8 @@ DSAStackTy::hasDSA(ValueDecl *D,
   auto I = std::prev(StartI);
   do {
     ++I;
+    if (I == EndI)
+      break;
     if (!DPred(I->Directive) && !isParallelOrTaskRegion(I->Directive))
       continue;
     DSAVarData DVar = getDSA(I, D);


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to