aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-04-12 22:10:35 +0000
committerTed Kremenek <kremenek@apple.com>2010-04-12 22:10:35 +0000
commit987aa87cf47811c44ac93afd1913c33f2829ed92 (patch)
treec80477b0f660b266b4974ee17f3accdbdf304258 /lib/Parse/ParseExpr.cpp
parent04e442714c292d9381cad2ac14087991132bddca (diff)
Add fixit hint for missing ':' in ternary expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r--lib/Parse/ParseExpr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index e479c36792..ee714e8e24 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -336,7 +336,8 @@ Parser::ParseRHSOfBinaryExpression(OwningExprResult LHS, unsigned MinPrec) {
}
if (Tok.isNot(tok::colon)) {
- Diag(Tok, diag::err_expected_colon);
+ Diag(Tok, diag::err_expected_colon)
+ << FixItHint::CreateInsertion(Tok.getLocation(), ": ");
Diag(OpToken, diag::note_matching) << "?";
return ExprError();
}