[flang][OpenMP][FIX] Fix function to check nesting level of current directive.
authorArnamoy Bhattacharyya <arnamoy10@gmail.com>
Fri, 12 Mar 2021 20:00:47 +0000 (15:00 -0500)
committerArnamoy Bhattacharyya <arnamoy10@gmail.com>
Fri, 12 Mar 2021 20:01:47 +0000 (15:01 -0500)
flang/lib/Semantics/check-directive-structure.h

index c682723..3ff4462 100644 (file)
@@ -236,7 +236,7 @@ protected:
     return nullptr;
   }
 
-  bool CurrentDirectiveIsNested() { return dirContext_.size() > 0; };
+  bool CurrentDirectiveIsNested() { return dirContext_.size() > 1; };
 
   void SetClauseSets(D dir) {
     dirContext_.back().allowedClauses = directiveClausesMap_[dir].allowed;