From a59665930b87d7510002dcf1f292b290673a47d3 Mon Sep 17 00:00:00 2001 From: Arnamoy Bhattacharyya Date: Fri, 12 Mar 2021 15:00:47 -0500 Subject: [PATCH] [flang][OpenMP][FIX] Fix function to check nesting level of current directive. --- flang/lib/Semantics/check-directive-structure.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang/lib/Semantics/check-directive-structure.h b/flang/lib/Semantics/check-directive-structure.h index c682723..3ff4462 100644 --- a/flang/lib/Semantics/check-directive-structure.h +++ b/flang/lib/Semantics/check-directive-structure.h @@ -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; -- 2.7.4