projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0696ef
)
Don't call back() on an empty SmallVector. Found by -fsanitize=enum!
author
Richard Smith
<richard-llvm@metafoo.co.uk>
Sat, 22 Dec 2012 00:15:13 +0000
(
00:15
+0000)
committer
Richard Smith
<richard-llvm@metafoo.co.uk>
Sat, 22 Dec 2012 00:15:13 +0000
(
00:15
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170968
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/YAMLTraits.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/YAMLTraits.cpp
b/lib/Support/YAMLTraits.cpp
index a31c31915a170eda5e8112190a092c8fc94efe45..8fcef40d243f4499364034eb38632cf288b79b8b 100644
(file)
--- a/
lib/Support/YAMLTraits.cpp
+++ b/
lib/Support/YAMLTraits.cpp
@@
-516,7
+516,7
@@
void Output::output(StringRef s) {
void Output::outputUpToEndOfLine(StringRef s) {
this->output(s);
- if (StateStack.back() != inFlowSeq)
+ if (StateStack.
empty() || StateStack.
back() != inFlowSeq)
NeedsNewLine = true;
}