aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/AST/TypePrinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/TypePrinter.cpp b/lib/AST/TypePrinter.cpp
index 777835640d..ef9704ec85 100644
--- a/lib/AST/TypePrinter.cpp
+++ b/lib/AST/TypePrinter.cpp
@@ -870,7 +870,7 @@ TemplateSpecializationType::PrintTemplateArgumentList(
// If the last character of our string is '>', add another space to
// keep the two '>''s separate tokens. We don't *have* to do this in
// C++0x, but it's still good hygiene.
- if (SpecString[SpecString.size() - 1] == '>')
+ if (!SpecString.empty() && SpecString[SpecString.size() - 1] == '>')
SpecString += ' ';
if (!SkipBrackets)