summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/DiagnosticCommonKinds.td
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
commitaf9a02c0cdaafab155de9b2f43bfad33a28429c3 (patch)
tree3d5e84d0ab2eb60845820ac10f12d0157912bb61 /include/clang/Basic/DiagnosticCommonKinds.td
parent2a59b1c79ae68b9db35a3fb87a8d729164131735 (diff)
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 'include/clang/Basic/DiagnosticCommonKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticCommonKinds.td6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticCommonKinds.td b/include/clang/Basic/DiagnosticCommonKinds.td
index c54bafc07f..12c3e759ce 100644
--- a/include/clang/Basic/DiagnosticCommonKinds.td
+++ b/include/clang/Basic/DiagnosticCommonKinds.td
@@ -30,7 +30,7 @@ def note_type_being_defined : Note<
"definition of %0 is not complete until the closing '}'">;
/// note_matching - this is used as a continuation of a previous diagnostic,
/// e.g. to specify the '(' when we expected a ')'.
-def note_matching : Note<"to match this '%0'">;
+def note_matching : Note<"to match this %0">;
def note_using : Note<"using">;
def note_possibility : Note<"one possibility">;
@@ -60,6 +60,10 @@ def err_invalid_numeric_udl : Error<
let CategoryName = "Parse Issue" in {
+def err_expected : Error<"expected %0">;
+def err_expected_either : Error<"expected %0 or %1">;
+def err_expected_after : Error<"expected %1 after %0">;
+
def err_param_redefinition : Error<"redefinition of parameter %0">;
def warn_method_param_redefinition : Warning<"redefinition of method parameter %0">;
def warn_method_param_declaration : Warning<"redeclaration of method parameter %0">,