YAML: Fix the output of sequences that contain flow sequences.
[oota-llvm.git] / lib / Support / YAMLTraits.cpp
index 74e541449f24f090b148c4b30490d750ebee0511..168217381907fd851992c72d4585153bdee8f01c 100644 (file)
@@ -633,7 +633,8 @@ void Output::newLineCheck() {
 
   if (StateStack.back() == inSeq) {
     OutputDash = true;
-  } else if ((StateStack.size() > 1) && (StateStack.back() == inMapFirstKey) &&
+  } else if ((StateStack.size() > 1) && ((StateStack.back() == inMapFirstKey) ||
+             (StateStack.back() == inFlowSeq)) &&
              (StateStack[StateStack.size() - 2] == inSeq)) {
     --Indent;
     OutputDash = true;