diff options
author | Alp Toker <alp@nuanti.com> | 2013-12-24 09:48:30 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2013-12-24 09:48:30 +0000 |
commit | af9a02c0cdaafab155de9b2f43bfad33a28429c3 (patch) | |
tree | 3d5e84d0ab2eb60845820ac10f12d0157912bb61 /lib/Sema/SemaExprObjC.cpp | |
parent | 2a59b1c79ae68b9db35a3fb87a8d729164131735 (diff) | |
download | clang-af9a02c0cdaafab155de9b2f43bfad33a28429c3.tar.gz clang-af9a02c0cdaafab155de9b2f43bfad33a28429c3.tar.bz2 clang-af9a02c0cdaafab155de9b2f43bfad33a28429c3.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197972 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index 72c3471863..ca67094f80 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -1699,7 +1699,8 @@ ActOnClassPropertyRefExpr(IdentifierInfo &receiverName, } if (IFace == 0) { - Diag(receiverNameLoc, diag::err_expected_ident_or_lparen); + Diag(receiverNameLoc, diag::err_expected_either) << tok::identifier + << tok::l_paren; return ExprError(); } } |