• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//==--- DiagnosticLexKinds.td - liblex diagnostics ------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10//===----------------------------------------------------------------------===//
11// Lexer Diagnostics
12//===----------------------------------------------------------------------===//
13
14let Component = "Lex", CategoryName = "Lexical or Preprocessor Issue" in {
15
16def null_in_string : Warning<"null character(s) preserved in string literal">,
17  InGroup<NullCharacter>;
18def null_in_char : Warning<"null character(s) preserved in character literal">,
19  InGroup<NullCharacter>;
20def null_in_file : Warning<"null character ignored">, InGroup<NullCharacter>;
21def warn_nested_block_comment : Warning<"'/*' within block comment">,
22  InGroup<Comment>;
23def escaped_newline_block_comment_end : Warning<
24  "escaped newline between */ characters at block comment end">,
25  InGroup<Comment>;
26def backslash_newline_space : Warning<
27  "backslash and newline separated by space">,
28  InGroup<DiagGroup<"backslash-newline-escape">>;
29
30// Digraphs.
31def warn_cxx98_compat_less_colon_colon : Warning<
32  "'<::' is treated as digraph '<:' (aka '[') followed by ':' in C++98">,
33  InGroup<CXX98Compat>, DefaultIgnore;
34
35// Trigraphs.
36def trigraph_ignored : Warning<"trigraph ignored">, InGroup<Trigraphs>;
37def trigraph_ignored_block_comment : Warning<
38  "ignored trigraph would end block comment">, InGroup<Trigraphs>;
39def trigraph_ends_block_comment : Warning<"trigraph ends block comment">,
40    InGroup<Trigraphs>;
41def trigraph_converted : Warning<"trigraph converted to '%0' character">,
42    InGroup<Trigraphs>;
43
44def ext_multi_line_line_comment : Extension<"multi-line // comment">,
45    InGroup<Comment>;
46def ext_line_comment : Extension<
47  "// comments are not allowed in this language">,
48  InGroup<Comment>;
49def ext_no_newline_eof : Extension<"no newline at end of file">,
50  InGroup<DiagGroup<"newline-eof">>;
51
52def warn_cxx98_compat_no_newline_eof : Warning<
53  "C++98 requires newline at end of file">,
54  InGroup<CXX98CompatPedantic>, DefaultIgnore;
55
56def ext_dollar_in_identifier : Extension<"'$' in identifier">,
57  InGroup<DiagGroup<"dollar-in-identifier-extension">>;
58def ext_charize_microsoft : Extension<"charizing operator #@ is a Microsoft extension">,
59  InGroup<Microsoft>;
60
61def ext_token_used : Extension<"extension used">,
62  InGroup<DiagGroup<"language-extension-token">>;
63
64def warn_cxx11_keyword : Warning<"'%0' is a keyword in C++11">,
65  InGroup<CXX11Compat>, DefaultIgnore;
66
67def ext_unterminated_string : ExtWarn<"missing terminating '\"' character">,
68  InGroup<InvalidPPToken>;
69def ext_unterminated_char : ExtWarn<"missing terminating ' character">,
70  InGroup<InvalidPPToken>;
71def ext_empty_character : ExtWarn<"empty character constant">,
72  InGroup<InvalidPPToken>;
73def err_unterminated_block_comment : Error<"unterminated /* comment">;
74def err_invalid_character_to_charify : Error<
75  "invalid argument to convert to character">;
76def err_unterminated___pragma : Error<"missing terminating ')' character">;
77
78def err_conflict_marker : Error<"version control conflict marker in file">;
79
80def err_raw_delim_too_long : Error<
81  "raw string delimiter longer than 16 characters"
82  "; use PREFIX( )PREFIX to delimit raw string">;
83def err_invalid_char_raw_delim : Error<
84  "invalid character '%0' character in raw string delimiter"
85  "; use PREFIX( )PREFIX to delimit raw string">;
86def err_unterminated_raw_string : Error<
87  "raw string missing terminating delimiter )%0\"">;
88def warn_cxx98_compat_raw_string_literal : Warning<
89  "raw string literals are incompatible with C++98">,
90  InGroup<CXX98Compat>, DefaultIgnore;
91
92def ext_multichar_character_literal : ExtWarn<
93  "multi-character character constant">, InGroup<MultiChar>;
94def ext_four_char_character_literal : Extension<
95  "multi-character character constant">, InGroup<FourByteMultiChar>;
96
97
98// Unicode and UCNs
99def err_invalid_utf8 : Error<
100  "source file is not valid UTF-8">;
101def err_non_ascii : Error<
102  "non-ASCII characters are not allowed outside of literals and identifiers">;
103def ext_unicode_whitespace : ExtWarn<
104  "treating Unicode character as whitespace">,
105  InGroup<DiagGroup<"unicode-whitespace">>;
106
107def err_hex_escape_no_digits : Error<
108  "\\%0 used with no following hex digits">;
109def warn_ucn_escape_no_digits : Warning<
110  "\\%0 used with no following hex digits; "
111  "treating as '\\' followed by identifier">, InGroup<Unicode>;
112def err_ucn_escape_incomplete : Error<
113  "incomplete universal character name">;
114def warn_ucn_escape_incomplete : Warning<
115  "incomplete universal character name; "
116  "treating as '\\' followed by identifier">, InGroup<Unicode>;
117def note_ucn_four_not_eight : Note<"did you mean to use '\\u'?">;
118
119def err_ucn_escape_basic_scs : Error<
120  "character '%0' cannot be specified by a universal character name">;
121def err_ucn_control_character : Error<
122  "universal character name refers to a control character">;
123def err_ucn_escape_invalid : Error<"invalid universal character">;
124def warn_ucn_escape_surrogate : Warning<
125  "universal character name refers to a surrogate character">,
126  InGroup<Unicode>;
127
128def warn_c99_compat_unicode_id : Warning<
129  "%select{using this character in an identifier|starting an identifier with "
130  "this character}0 is incompatible with C99">,
131  InGroup<C99Compat>, DefaultIgnore;
132def warn_cxx98_compat_unicode_id : Warning<
133  "using this character in an identifier is incompatible with C++98">,
134  InGroup<CXX98Compat>, DefaultIgnore;
135
136def warn_cxx98_compat_literal_ucn_escape_basic_scs : Warning<
137  "specifying character '%0' with a universal character name "
138  "is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore;
139def warn_cxx98_compat_literal_ucn_control_character : Warning<
140  "universal character name referring to a control character "
141  "is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore;
142def warn_ucn_not_valid_in_c89 : Warning<
143  "universal character names are only valid in C99 or C++; "
144  "treating as '\\' followed by identifier">, InGroup<Unicode>;
145def warn_ucn_not_valid_in_c89_literal : ExtWarn<
146  "universal character names are only valid in C99 or C++">, InGroup<Unicode>;
147
148
149// Literal
150def ext_nonstandard_escape : Extension<
151  "use of non-standard escape character '\\%0'">;
152def ext_unknown_escape : ExtWarn<"unknown escape sequence '\\%0'">;
153def err_invalid_decimal_digit : Error<"invalid digit '%0' in decimal constant">;
154def err_invalid_binary_digit : Error<"invalid digit '%0' in binary constant">;
155def err_invalid_octal_digit : Error<"invalid digit '%0' in octal constant">;
156def err_invalid_suffix_integer_constant : Error<
157  "invalid suffix '%0' on integer constant">;
158def err_invalid_suffix_float_constant : Error<
159  "invalid suffix '%0' on floating constant">;
160def warn_extraneous_char_constant : Warning<
161  "extraneous characters in character constant ignored">;
162def warn_char_constant_too_large : Warning<
163  "character constant too long for its type">;
164def err_multichar_utf_character_literal : Error<
165  "Unicode character literals may not contain multiple characters">;
166def err_exponent_has_no_digits : Error<"exponent has no digits">;
167def ext_imaginary_constant : Extension<
168  "imaginary constants are a GNU extension">, InGroup<GNU>;
169def err_hexconstant_requires_exponent : Error<
170  "hexadecimal floating constants require an exponent">;
171def err_hexconstant_requires_digits : Error<
172  "hexadecimal floating constants require a significand">;
173def ext_hexconstant_invalid : Extension<
174  "hexadecimal floating constants are a C99 feature">, InGroup<C99>;
175def ext_binary_literal : Extension<
176  "binary integer literals are a GNU extension">, InGroup<GNU>;
177def ext_binary_literal_cxx1y : Extension<
178  "binary integer literals are a C++1y extension">, InGroup<CXX1y>;
179def warn_cxx11_compat_binary_literal : Warning<
180  "binary integer literals are incompatible with C++ standards before C++1y">,
181  InGroup<CXXPre1yCompatPedantic>, DefaultIgnore;
182def err_pascal_string_too_long : Error<"Pascal string is too long">;
183def err_octal_escape_too_large : Error<"octal escape sequence out of range">;
184def err_hex_escape_too_large : Error<"hex escape sequence out of range">;
185def ext_string_too_long : Extension<"string literal of length %0 exceeds "
186  "maximum length %1 that %select{C90|ISO C99|C++}2 compilers are required to "
187  "support">, InGroup<OverlengthStrings>;
188def err_character_too_large : Error<
189  "character too large for enclosing character literal type">;
190def warn_c99_compat_unicode_literal : Warning<
191  "unicode literals are incompatible with C99">,
192  InGroup<C99Compat>, DefaultIgnore;
193def warn_cxx98_compat_unicode_literal : Warning<
194  "unicode literals are incompatible with C++98">,
195  InGroup<CXX98Compat>, DefaultIgnore;
196def warn_cxx11_compat_user_defined_literal : Warning<
197  "identifier after literal will be treated as a user-defined literal suffix "
198  "in C++11">, InGroup<CXX11Compat>, DefaultIgnore;
199def warn_cxx11_compat_reserved_user_defined_literal : Warning<
200  "identifier after literal will be treated as a reserved user-defined literal "
201  "suffix in C++11">,
202  InGroup<CXX11CompatReservedUserDefinedLiteral>, DefaultIgnore;
203def ext_reserved_user_defined_literal : ExtWarn<
204  "invalid suffix on literal; C++11 requires a space between literal and "
205  "identifier">, InGroup<ReservedUserDefinedLiteral>, DefaultError;
206def ext_ms_reserved_user_defined_literal : ExtWarn<
207  "invalid suffix on literal; C++11 requires a space between literal and "
208  "identifier">, InGroup<ReservedUserDefinedLiteral>;
209def err_unsupported_string_concat : Error<
210  "unsupported non-standard concatenation of string literals">;
211def err_string_concat_mixed_suffix : Error<
212  "differing user-defined suffixes ('%0' and '%1') in string literal "
213  "concatenation">;
214def err_pp_invalid_udl : Error<
215  "%select{character|integer}0 literal with user-defined suffix "
216  "cannot be used in preprocessor constant expression">;
217def err_bad_string_encoding : Error<
218  "illegal character encoding in string literal">;
219def warn_bad_string_encoding : ExtWarn<
220  "illegal character encoding in string literal">,
221  InGroup<InvalidSourceEncoding>;
222def err_bad_character_encoding : Error<
223  "illegal character encoding in character literal">;
224def warn_bad_character_encoding : ExtWarn<
225  "illegal character encoding in character literal">,
226  InGroup<InvalidSourceEncoding>;
227def err_lexing_string : Error<"failure when lexing a string">;
228
229
230//===----------------------------------------------------------------------===//
231// PTH Diagnostics
232//===----------------------------------------------------------------------===//
233def err_invalid_pth_file : Error<
234    "invalid or corrupt PTH file '%0'">;
235
236//===----------------------------------------------------------------------===//
237// Preprocessor Diagnostics
238//===----------------------------------------------------------------------===//
239
240let CategoryName = "User Defined Issues" in {
241def pp_hash_warning : Warning<"%0">,
242  InGroup<PoundWarning>, DefaultWarnShowInSystemHeader;
243def err_pp_hash_error : Error<"%0">;
244}
245
246def pp_include_next_in_primary : Warning<
247  "#include_next in primary source file">;
248def pp_include_macros_out_of_predefines : Error<
249  "the #__include_macros directive is only for internal use by -imacros">;
250def pp_include_next_absolute_path : Warning<"#include_next with absolute path">;
251def ext_c99_whitespace_required_after_macro_name : ExtWarn<
252  "ISO C99 requires whitespace after the macro name">, InGroup<C99>;
253def ext_missing_whitespace_after_macro_name : ExtWarn<
254  "whitespace required after macro name">;
255def warn_missing_whitespace_after_macro_name : Warning<
256  "whitespace recommended after macro name">;
257
258def pp_pragma_once_in_main_file : Warning<"#pragma once in main file">;
259def pp_pragma_sysheader_in_main_file : Warning<
260  "#pragma system_header ignored in main file">;
261def pp_poisoning_existing_macro : Warning<"poisoning existing macro">;
262def pp_out_of_date_dependency : Warning<
263  "current file is older than dependency %0">;
264def ext_pp_undef_builtin_macro : ExtWarn<"undefining builtin macro">,
265  InGroup<BuiltinMacroRedefined>;
266def ext_pp_redef_builtin_macro : ExtWarn<"redefining builtin macro">,
267  InGroup<BuiltinMacroRedefined>;
268def pp_disabled_macro_expansion : Warning<
269  "disabled expansion of recursive macro">, DefaultIgnore,
270  InGroup<DiagGroup<"disabled-macro-expansion">>;
271def pp_macro_not_used : Warning<"macro is not used">, DefaultIgnore,
272  InGroup<DiagGroup<"unused-macros">>;
273def warn_pp_undef_identifier : Warning<
274  "%0 is not defined, evaluates to 0">,
275  InGroup<DiagGroup<"undef">>, DefaultIgnore;
276def warn_pp_ambiguous_macro : Warning<
277  "ambiguous expansion of macro %0">, InGroup<AmbiguousMacro>;
278def note_pp_ambiguous_macro_chosen : Note<
279  "expanding this definition of %0">;
280def note_pp_ambiguous_macro_other : Note<
281  "other definition of %0">;
282
283def pp_invalid_string_literal : Warning<
284  "invalid string literal, ignoring final '\\'">;
285def warn_pp_expr_overflow : Warning<
286  "integer overflow in preprocessor expression">;
287def warn_pp_convert_lhs_to_positive : Warning<
288  "left side of operator converted from negative value to unsigned: %0">;
289def warn_pp_convert_rhs_to_positive : Warning<
290  "right side of operator converted from negative value to unsigned: %0">;
291
292def ext_pp_import_directive : Extension<"#import is a language extension">,
293  InGroup<DiagGroup<"import-preprocessor-directive-pedantic">>;
294def err_pp_import_directive_ms : Error<
295  "#import of type library is an unsupported Microsoft feature">;
296
297def ext_pp_ident_directive : Extension<"#ident is a language extension">;
298def ext_pp_include_next_directive : Extension<
299  "#include_next is a language extension">;
300def ext_pp_warning_directive : Extension<"#warning is a language extension">;
301
302def ext_pp_extra_tokens_at_eol : ExtWarn<
303  "extra tokens at end of #%0 directive">, InGroup<ExtraTokens>;
304
305def ext_pp_comma_expr : Extension<"comma operator in operand of #if">;
306def ext_pp_bad_vaargs_use : Extension<
307  "__VA_ARGS__ can only appear in the expansion of a C99 variadic macro">;
308def ext_pp_macro_redef : ExtWarn<"%0 macro redefined">;
309def ext_variadic_macro : Extension<"variadic macros are a C99 feature">,
310  InGroup<VariadicMacros>;
311def warn_cxx98_compat_variadic_macro : Warning<
312  "variadic macros are incompatible with C++98">,
313  InGroup<CXX98CompatPedantic>, DefaultIgnore;
314def ext_named_variadic_macro : Extension<
315  "named variadic macros are a GNU extension">, InGroup<VariadicMacros>;
316def err_embedded_include : Error<
317  "embedding a #%0 directive within macro arguments is not supported">;
318def ext_embedded_directive : Extension<
319  "embedding a directive within macro arguments has undefined behavior">,
320  InGroup<DiagGroup<"embedded-directive">>;
321def ext_missing_varargs_arg : Extension<
322  "must specify at least one argument for '...' parameter of variadic macro">,
323  InGroup<GNU>;
324def ext_empty_fnmacro_arg : Extension<
325  "empty macro arguments are a C99 feature">, InGroup<C99>;
326def warn_cxx98_compat_empty_fnmacro_arg : Warning<
327  "empty macro arguments are incompatible with C++98">,
328  InGroup<CXX98CompatPedantic>, DefaultIgnore;
329def note_macro_here : Note<"macro %0 defined here">;
330
331def err_pp_opencl_variadic_macros :
332  Error<"variadic macros not supported in OpenCL">;
333
334def err_pp_invalid_directive : Error<"invalid preprocessing directive">;
335def err_pp_directive_required : Error<
336  "%0 must be used within a preprocessing directive">;
337def err_pp_file_not_found : Error<"'%0' file not found">, DefaultFatal;
338def err_pp_file_not_found_not_fatal : Error<
339  "'%0' file not found with <angled> include; use \"quotes\" instead">;
340def err_pp_error_opening_file : Error<
341  "error opening file '%0': %1">, DefaultFatal;
342def err_pp_empty_filename : Error<"empty filename">;
343def err_pp_include_too_deep : Error<"#include nested too deeply">;
344def err_pp_expects_filename : Error<"expected \"FILENAME\" or <FILENAME>">;
345def err_pp_macro_not_identifier : Error<"macro names must be identifiers">;
346def err_pp_missing_macro_name : Error<"macro name missing">;
347def err_pp_missing_rparen_in_macro_def : Error<
348  "missing ')' in macro parameter list">;
349def err_pp_invalid_tok_in_arg_list : Error<
350  "invalid token in macro parameter list">;
351def err_pp_expected_ident_in_arg_list : Error<
352  "expected identifier in macro parameter list">;
353def err_pp_expected_comma_in_arg_list : Error<
354  "expected comma in macro parameter list">;
355def err_pp_duplicate_name_in_arg_list : Error<
356  "duplicate macro parameter name %0">;
357def err_pp_stringize_not_parameter : Error<
358  "'#' is not followed by a macro parameter">;
359def err_pp_malformed_ident : Error<"invalid #ident directive">;
360def err_pp_unterminated_conditional : Error<
361  "unterminated conditional directive">;
362def pp_err_else_after_else : Error<"#else after #else">;
363def pp_err_elif_after_else : Error<"#elif after #else">;
364def pp_err_else_without_if : Error<"#else without #if">;
365def pp_err_elif_without_if : Error<"#elif without #if">;
366def err_pp_endif_without_if : Error<"#endif without #if">;
367def err_pp_expected_value_in_expr : Error<"expected value in expression">;
368def err_pp_expected_rparen : Error<"expected ')' in preprocessor expression">;
369def err_pp_expected_eol : Error<
370  "expected end of line in preprocessor expression">;
371def err_pp_defined_requires_identifier : Error<
372  "operator 'defined' requires an identifier">;
373def err_pp_missing_lparen : Error<"missing '(' after '%0'">;
374def err_pp_missing_rparen : Error<"missing ')' after '%0'">;
375def err_pp_colon_without_question : Error<"':' without preceding '?'">;
376def err_pp_division_by_zero : Error<
377  "division by zero in preprocessor expression">;
378def err_pp_remainder_by_zero : Error<
379  "remainder by zero in preprocessor expression">;
380def err_pp_expr_bad_token_binop : Error<
381  "token is not a valid binary operator in a preprocessor subexpression">;
382def err_pp_expr_bad_token_start_expr : Error<
383  "invalid token at start of a preprocessor expression">;
384def err_pp_invalid_poison : Error<"can only poison identifier tokens">;
385def err_pp_used_poisoned_id : Error<"attempt to use a poisoned identifier">;
386
387def err_feature_check_malformed : Error<
388  "builtin feature check macro requires a parenthesized identifier">;
389
390def err_warning_check_malformed : Error<
391  "builtin warning check macro requires a parenthesized string">;
392def warn_has_warning_invalid_option :
393   ExtWarn<"__has_warning expected option name (e.g. \"-Wundef\")">,
394   InGroup<MalformedWarningCheck>;
395
396def warn_pragma_include_alias_mismatch_angle :
397   ExtWarn<"angle-bracketed include <%0> cannot be aliased to double-quoted "
398   "include \"%1\"">, InGroup<UnknownPragmas>;
399def warn_pragma_include_alias_mismatch_quote :
400   ExtWarn<"double-quoted include \"%0\" cannot be aliased to angle-bracketed "
401   "include <%1>">, InGroup<UnknownPragmas>;
402def warn_pragma_include_alias_expected :
403   ExtWarn<"pragma include_alias expected '%0'">,
404   InGroup<UnknownPragmas>;
405def warn_pragma_include_alias_expected_filename :
406   ExtWarn<"pragma include_alias expected include filename">,
407   InGroup<UnknownPragmas>;
408
409def err__Pragma_malformed : Error<
410  "_Pragma takes a parenthesized string literal">;
411def err_pragma_message_malformed : Error<
412  "pragma %select{message|warning|error}0 requires parenthesized string">;
413def err_pragma_push_pop_macro_malformed : Error<
414   "pragma %0 requires a parenthesized string">;
415def warn_pragma_pop_macro_no_push : Warning<
416   "pragma pop_macro could not pop '%0', no matching push_macro">;
417def warn_pragma_message : Warning<"%0">,
418   InGroup<PoundPragmaMessage>, DefaultWarnNoWerror;
419def err_pragma_message : Error<"%0">;
420def warn_pragma_ignored : Warning<"unknown pragma ignored">,
421   InGroup<UnknownPragmas>, DefaultIgnore;
422def ext_stdc_pragma_ignored : ExtWarn<"unknown pragma in STDC namespace">,
423   InGroup<UnknownPragmas>;
424def ext_on_off_switch_syntax :
425   ExtWarn<"expected 'ON' or 'OFF' or 'DEFAULT' in pragma">,
426   InGroup<UnknownPragmas>;
427def ext_pragma_syntax_eod :
428   ExtWarn<"expected end of directive in pragma">,
429   InGroup<UnknownPragmas>;
430def warn_stdc_fenv_access_not_supported :
431   Warning<"pragma STDC FENV_ACCESS ON is not supported, ignoring pragma">,
432   InGroup<UnknownPragmas>;
433def warn_pragma_diagnostic_invalid :
434   ExtWarn<"pragma diagnostic expected 'error', 'warning', 'ignored', 'fatal',"
435            " 'push', or 'pop'">,
436   InGroup<UnknownPragmas>;
437def warn_pragma_diagnostic_cannot_pop :
438   ExtWarn<"pragma diagnostic pop could not pop, no matching push">,
439   InGroup<UnknownPragmas>;
440def warn_pragma_diagnostic_invalid_option :
441   ExtWarn<"pragma diagnostic expected option name (e.g. \"-Wundef\")">,
442   InGroup<UnknownPragmas>;
443def warn_pragma_diagnostic_invalid_token :
444   ExtWarn<"unexpected token in pragma diagnostic">,
445   InGroup<UnknownPragmas>;
446def warn_pragma_diagnostic_unknown_warning :
447   ExtWarn<"unknown warning group '%0', ignored">,
448   InGroup<UnknownPragmas>;
449// - #pragma __debug
450def warn_pragma_debug_unexpected_command : Warning<
451  "unexpected debug command '%0'">;
452
453def err_defined_macro_name : Error<"'defined' cannot be used as a macro name">;
454def err_paste_at_start : Error<
455  "'##' cannot appear at start of macro expansion">;
456def err_paste_at_end : Error<"'##' cannot appear at end of macro expansion">;
457def ext_paste_comma : Extension<
458  "token pasting of ',' and __VA_ARGS__ is a GNU extension">, InGroup<GNU>;
459def err_unterm_macro_invoc : Error<
460  "unterminated function-like macro invocation">;
461def err_too_many_args_in_macro_invoc : Error<
462  "too many arguments provided to function-like macro invocation">;
463def note_suggest_parens_for_macro : Note<
464  "parentheses are required around macro argument containing braced "
465  "initializer list">;
466def note_init_list_at_beginning_of_macro_argument : Note<
467  "cannot use initializer list at the beginning of a macro argument">;
468def err_too_few_args_in_macro_invoc : Error<
469  "too few arguments provided to function-like macro invocation">;
470def err_pp_bad_paste : Error<
471  "pasting formed '%0', an invalid preprocessing token">;
472def err_pp_bad_paste_ms : Warning<
473  "pasting formed '%0', an invalid preprocessing token">, DefaultError,
474  InGroup<DiagGroup<"invalid-token-paste">>;
475def err_pp_operator_used_as_macro_name : Error<
476  "C++ operator '%0' cannot be used as a macro name">;
477def err_pp_illegal_floating_literal : Error<
478  "floating point literal in preprocessor expression">;
479def err_pp_line_requires_integer : Error<
480  "#line directive requires a positive integer argument">;
481def ext_pp_line_zero : Extension<
482  "#line directive with zero argument is a GNU extension">,
483  InGroup<GNU>;
484def err_pp_line_invalid_filename : Error<
485  "invalid filename for #line directive">;
486def warn_pp_line_decimal : Warning<
487  "%select{#line|GNU line marker}0 directive interprets number as decimal, not octal">;
488def err_pp_line_digit_sequence : Error<
489  "%select{#line|GNU line marker}0 directive requires a simple digit sequence">;
490def err_pp_linemarker_requires_integer : Error<
491  "line marker directive requires a positive integer argument">;
492def err_pp_linemarker_invalid_filename : Error<
493  "invalid filename for line marker directive">;
494def err_pp_linemarker_invalid_flag : Error<
495  "invalid flag line marker directive">;
496def err_pp_linemarker_invalid_pop : Error<
497  "invalid line marker flag '2': cannot pop empty include stack">;
498def ext_pp_line_too_big : Extension<
499  "C requires #line number to be less than %0, allowed as extension">;
500def warn_cxx98_compat_pp_line_too_big : Warning<
501  "#line number greater than 32767 is incompatible with C++98">,
502  InGroup<CXX98CompatPedantic>, DefaultIgnore;
503
504def err_pp_visibility_non_macro : Error<"no macro named %0">;
505
506def err_pp_arc_cf_code_audited_syntax : Error<"expected 'begin' or 'end'">;
507def err_pp_double_begin_of_arc_cf_code_audited : Error<
508  "already inside '#pragma clang arc_cf_code_audited'">;
509def err_pp_unmatched_end_of_arc_cf_code_audited : Error<
510  "not currently inside '#pragma clang arc_cf_code_audited'">;
511def err_pp_include_in_arc_cf_code_audited : Error<
512  "cannot #include files inside '#pragma clang arc_cf_code_audited'">;
513def err_pp_eof_in_arc_cf_code_audited : Error<
514  "'#pragma clang arc_cf_code_audited' was not ended within this file">;
515
516// Module map parsing
517def err_mmap_unknown_token : Error<"skipping stray token">;
518def err_mmap_expected_module : Error<"expected module declaration">;
519def err_mmap_expected_module_name : Error<"expected module name">;
520def err_mmap_expected_lbrace : Error<"expected '{' to start module '%0'">;
521def err_mmap_expected_rbrace : Error<"expected '}'">;
522def note_mmap_lbrace_match : Note<"to match this '{'">;
523def err_mmap_expected_rsquare : Error<"expected ']' to close attribute">;
524def note_mmap_lsquare_match : Note<"to match this ']'">;
525def err_mmap_expected_member : Error<
526  "expected umbrella, header, submodule, or module export">;
527def err_mmap_expected_header : Error<"expected a header name after '%0'">;
528def err_mmap_module_redefinition : Error<
529  "redefinition of module '%0'">;
530def note_mmap_prev_definition : Note<"previously defined here">;
531def err_mmap_header_conflict : Error<
532  "header '%0' is already part of module '%1'">;
533def err_mmap_header_not_found : Error<
534  "%select{|umbrella }0header '%1' not found">;
535def err_mmap_umbrella_dir_not_found : Error<
536  "umbrella directory '%0' not found">;
537def err_mmap_umbrella_clash : Error<
538  "umbrella for module '%0' already covers this directory">;
539def err_mmap_export_module_id : Error<
540  "expected an exported module name or '*'">;
541def err_mmap_expected_library_name : Error<
542  "expected %select{library|framework}0 name as a string">;
543def err_mmap_config_macro_submodule : Error<
544  "configuration macros are only allowed on top-level modules">;
545def err_mmap_expected_config_macro : Error<
546  "expected configuration macro name after ','">;
547def err_mmap_expected_conflicts_comma : Error<
548  "expected ',' after conflicting module name">;
549def err_mmap_expected_conflicts_message : Error<
550  "expected a message describing the conflict with '%0'">;
551def err_mmap_missing_module_unqualified : Error<
552  "no module named '%0' visible from '%1'">;
553def err_mmap_missing_module_qualified : Error<
554  "no module named '%0' in '%1'">;
555def err_mmap_top_level_inferred_submodule : Error<
556  "only submodules and framework modules may be inferred with wildcard syntax">;
557def err_mmap_inferred_no_umbrella : Error<
558  "inferred submodules require a module with an umbrella">;
559def err_mmap_inferred_framework_submodule : Error<
560  "inferred submodule cannot be a framework submodule">;
561def err_mmap_explicit_inferred_framework : Error<
562  "inferred framework modules cannot be 'explicit'">;
563def err_mmap_missing_exclude_name : Error<
564  "expected excluded module name">;
565def err_mmap_inferred_redef : Error<
566  "redefinition of inferred submodule">;
567def err_mmap_expected_lbrace_wildcard : Error<
568  "expected '{' to start inferred submodule">;
569def err_mmap_expected_inferred_member : Error<
570  "expected %select{module exclusion with 'exclude'|'export *'}0">;
571def err_mmap_expected_export_wildcard : Error<
572  "only '*' can be exported from an inferred submodule">;
573def err_mmap_explicit_top_level : Error<
574  "'explicit' is not permitted on top-level modules">;
575def err_mmap_nested_submodule_id : Error<
576  "qualified module name can only be used to define modules at the top level">;
577def err_mmap_expected_feature : Error<"expected a feature name">;
578def err_mmap_expected_attribute : Error<"expected an attribute name">;
579def warn_mmap_unknown_attribute : Warning<"unknown attribute '%0'">,
580  InGroup<IgnoredAttributes>;
581
582def warn_auto_module_import : Warning<
583  "treating #%select{include|import|include_next|__include_macros}0 as an "
584  "import of module '%1'">, InGroup<AutoImport>, DefaultIgnore;
585def warn_uncovered_module_header : Warning<
586  "umbrella header for module '%0' does not include header '%1'">,
587  InGroup<IncompleteUmbrella>, DefaultIgnore;
588def warn_forgotten_module_header : Warning<
589  "header '%0' is included in module '%1' but not listed in module map">,
590  InGroup<IncompleteModule>, DefaultIgnore;
591def err_expected_id_building_module : Error<
592  "expected a module name in '__building_module' expression">;
593def error_use_of_private_header_outside_module : Error<
594  "use of private header from outside its module: '%0'">;
595
596def warn_header_guard : Warning<
597  "%0 is used as a header guard here, followed by #define of a different macro">,
598  InGroup<DiagGroup<"header-guard">>;
599def note_header_guard : Note<
600  "%0 is defined here; did you mean %1?">;
601}
602