summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseInit.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2013-12-24 09:48:30 +0000
committerAlp Toker <alp@nuanti.com>2013-12-24 09:48:30 +0000
commitec543279db99283f711c92c37f37b05a243dcf4d (patch)
tree03698109ecc933f59566d8c95a3f2f68b96046b9 /clang/lib/Parse/ParseInit.cpp
parent090a7cd76df5805b13a34d1b6b4ee8dae084b528 (diff)
downloadbcm5719-llvm-ec543279db99283f711c92c37f37b05a243dcf4d.tar.gz
bcm5719-llvm-ec543279db99283f711c92c37f37b05a243dcf4d.zip
Support and use token kinds as diagnostic arguments
Introduce proper facilities to render token spellings using the diagnostic formatter. Replaces most of the hard-coded diagnostic messages related to expected tokens, which all shared the same semantics but had to be multiply defined due to variations in token order or quote marks. The associated parser changes are largely mechanical but they expose commonality in whole chunks of the parser that can now be factored away. This commit uses C++11 typed enums along with a speculative legacy fallback until the transition is complete. Requires corresponding changes in LLVM r197895. llvm-svn: 197972
Diffstat (limited to 'clang/lib/Parse/ParseInit.cpp')
-rw-r--r--clang/lib/Parse/ParseInit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseInit.cpp b/clang/lib/Parse/ParseInit.cpp
index 56d8edcdb41..c21dbba47a7 100644
--- a/clang/lib/Parse/ParseInit.cpp
+++ b/clang/lib/Parse/ParseInit.cpp
@@ -493,7 +493,7 @@ bool Parser::ParseMicrosoftIfExistsBraceInitializer(ExprVector &InitExprs,
BalancedDelimiterTracker Braces(*this, tok::l_brace);
if (Braces.consumeOpen()) {
- Diag(Tok, diag::err_expected_lbrace);
+ Diag(Tok, diag::err_expected) << tok::l_brace;
return false;
}
OpenPOWER on IntegriCloud