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_char_or_string : Warning< 17 "null character(s) preserved in %select{char|string}0 literal">, 18 InGroup<NullCharacter>; 19def null_in_file : Warning<"null character ignored">, InGroup<NullCharacter>; 20def warn_nested_block_comment : Warning<"'/*' within block comment">, 21 InGroup<Comment>; 22def escaped_newline_block_comment_end : Warning< 23 "escaped newline between */ characters at block comment end">, 24 InGroup<Comment>; 25def backslash_newline_space : Warning< 26 "backslash and newline separated by space">, 27 InGroup<DiagGroup<"backslash-newline-escape">>; 28 29// Digraphs. 30def warn_cxx98_compat_less_colon_colon : Warning< 31 "'<::' is treated as digraph '<:' (aka '[') followed by ':' in C++98">, 32 InGroup<CXX98Compat>, DefaultIgnore; 33 34// Trigraphs. 35def trigraph_ignored : Warning<"trigraph ignored">, InGroup<Trigraphs>; 36def trigraph_ignored_block_comment : Warning< 37 "ignored trigraph would end block comment">, InGroup<Trigraphs>; 38def trigraph_ends_block_comment : Warning<"trigraph ends block comment">, 39 InGroup<Trigraphs>; 40def trigraph_converted : Warning<"trigraph converted to '%0' character">, 41 InGroup<Trigraphs>; 42 43def ext_multi_line_line_comment : Extension<"multi-line // comment">, 44 InGroup<Comment>; 45def ext_line_comment : Extension< 46 "// comments are not allowed in this language">, 47 InGroup<Comment>; 48def ext_no_newline_eof : Extension<"no newline at end of file">, 49 InGroup<NewlineEOF>; 50def warn_no_newline_eof : Warning<"no newline at end of file">, 51 InGroup<NewlineEOF>, DefaultIgnore; 52 53def warn_cxx98_compat_no_newline_eof : Warning< 54 "C++98 requires newline at end of file">, 55 InGroup<CXX98CompatPedantic>, DefaultIgnore; 56 57def ext_dollar_in_identifier : Extension<"'$' in identifier">, 58 InGroup<DiagGroup<"dollar-in-identifier-extension">>; 59def ext_charize_microsoft : Extension< 60 "charizing operator #@ is a Microsoft extension">, 61 InGroup<MicrosoftCharize>; 62 63def ext_token_used : Extension<"extension used">, 64 InGroup<DiagGroup<"language-extension-token">>; 65 66def warn_cxx11_keyword : Warning<"'%0' is a keyword in C++11">, 67 InGroup<CXX11Compat>, DefaultIgnore; 68 69def ext_unterminated_char_or_string : ExtWarn< 70 "missing terminating %select{'|'\"'}0 character">, 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'">, 153 InGroup<DiagGroup<"unknown-escape-sequence">>; 154def err_invalid_digit : Error< 155 "invalid digit '%0' in %select{decimal|octal|binary}1 constant">; 156def err_invalid_suffix_constant : Error< 157 "invalid suffix '%0' on %select{integer|floating}1 constant">; 158def warn_cxx11_compat_digit_separator : Warning< 159 "digit separators are incompatible with C++ standards before C++14">, 160 InGroup<CXXPre14Compat>, DefaultIgnore; 161def err_digit_separator_not_between_digits : Error< 162 "digit separator cannot appear at %select{start|end}0 of digit sequence">; 163def warn_extraneous_char_constant : Warning< 164 "extraneous characters in character constant ignored">; 165def warn_char_constant_too_large : Warning< 166 "character constant too long for its type">; 167def err_multichar_utf_character_literal : Error< 168 "Unicode character literals may not contain multiple characters">; 169def err_exponent_has_no_digits : Error<"exponent has no digits">; 170def ext_imaginary_constant : Extension< 171 "imaginary constants are a GNU extension">, InGroup<GNUImaginaryConstant>; 172def err_hexconstant_requires: Error< 173 "hexadecimal floating constants require %select{an exponent|a significand}0">; 174def ext_hexconstant_invalid : Extension< 175 "hexadecimal floating constants are a C99 feature">, InGroup<C99>; 176def ext_binary_literal : Extension< 177 "binary integer literals are a GNU extension">, InGroup<GNUBinaryLiteral>; 178def ext_binary_literal_cxx14 : Extension< 179 "binary integer literals are a C++14 extension">, InGroup<CXX14BinaryLiteral>; 180def warn_cxx11_compat_binary_literal : Warning< 181 "binary integer literals are incompatible with C++ standards before C++14">, 182 InGroup<CXXPre14CompatPedantic>, DefaultIgnore; 183def err_pascal_string_too_long : Error<"Pascal string is too long">; 184def err_escape_too_large : Error< 185 "%select{hex|octal}0 escape sequence out of range">; 186def ext_string_too_long : Extension<"string literal of length %0 exceeds " 187 "maximum length %1 that %select{C90|ISO C99|C++}2 compilers are required to " 188 "support">, InGroup<OverlengthStrings>; 189def err_character_too_large : Error< 190 "character too large for enclosing character literal type">; 191def warn_c99_compat_unicode_literal : Warning< 192 "unicode literals are incompatible with C99">, 193 InGroup<C99Compat>, DefaultIgnore; 194def warn_cxx98_compat_unicode_literal : Warning< 195 "unicode literals are incompatible with C++98">, 196 InGroup<CXX98Compat>, DefaultIgnore; 197def warn_cxx14_compat_u8_character_literal : Warning< 198 "unicode literals are incompatible with C++ standards before C++1z">, 199 InGroup<CXXPre1zCompat>, DefaultIgnore; 200def warn_cxx11_compat_user_defined_literal : Warning< 201 "identifier after literal will be treated as a user-defined literal suffix " 202 "in C++11">, InGroup<CXX11Compat>, DefaultIgnore; 203def warn_cxx11_compat_reserved_user_defined_literal : Warning< 204 "identifier after literal will be treated as a reserved user-defined literal " 205 "suffix in C++11">, 206 InGroup<CXX11CompatReservedUserDefinedLiteral>, DefaultIgnore; 207def ext_reserved_user_defined_literal : ExtWarn< 208 "invalid suffix on literal; C++11 requires a space between literal and " 209 "identifier">, InGroup<ReservedUserDefinedLiteral>, DefaultError; 210def ext_ms_reserved_user_defined_literal : ExtWarn< 211 "invalid suffix on literal; C++11 requires a space between literal and " 212 "identifier">, InGroup<ReservedUserDefinedLiteral>; 213def err_unsupported_string_concat : Error< 214 "unsupported non-standard concatenation of string literals">; 215def err_string_concat_mixed_suffix : Error< 216 "differing user-defined suffixes ('%0' and '%1') in string literal " 217 "concatenation">; 218def err_pp_invalid_udl : Error< 219 "%select{character|integer}0 literal with user-defined suffix " 220 "cannot be used in preprocessor constant expression">; 221def err_bad_string_encoding : Error< 222 "illegal character encoding in string literal">; 223def warn_bad_string_encoding : ExtWarn< 224 "illegal character encoding in string literal">, 225 InGroup<InvalidSourceEncoding>; 226def err_bad_character_encoding : Error< 227 "illegal character encoding in character literal">; 228def warn_bad_character_encoding : ExtWarn< 229 "illegal character encoding in character literal">, 230 InGroup<InvalidSourceEncoding>; 231def err_lexing_string : Error<"failure when lexing a string">; 232 233 234//===----------------------------------------------------------------------===// 235// PTH Diagnostics 236//===----------------------------------------------------------------------===// 237def err_invalid_pth_file : Error< 238 "invalid or corrupt PTH file '%0'">; 239 240//===----------------------------------------------------------------------===// 241// Preprocessor Diagnostics 242//===----------------------------------------------------------------------===// 243 244let CategoryName = "User-Defined Issue" in { 245def pp_hash_warning : Warning<"%0">, 246 InGroup<PoundWarning>, ShowInSystemHeader; 247def err_pp_hash_error : Error<"%0">; 248} 249 250def pp_include_next_in_primary : Warning< 251 "#include_next in primary source file">, 252 InGroup<DiagGroup<"include-next-outside-header">>; 253def pp_include_macros_out_of_predefines : Error< 254 "the #__include_macros directive is only for internal use by -imacros">; 255def pp_include_next_absolute_path : Warning< 256 "#include_next with absolute path">, 257 InGroup<DiagGroup<"include-next-absolute-path">>; 258def ext_c99_whitespace_required_after_macro_name : ExtWarn< 259 "ISO C99 requires whitespace after the macro name">, InGroup<C99>; 260def ext_missing_whitespace_after_macro_name : ExtWarn< 261 "whitespace required after macro name">; 262def warn_missing_whitespace_after_macro_name : Warning< 263 "whitespace recommended after macro name">; 264 265def pp_pragma_once_in_main_file : Warning<"#pragma once in main file">, 266 InGroup<DiagGroup<"pragma-once-outside-header">>; 267def pp_pragma_sysheader_in_main_file : Warning< 268 "#pragma system_header ignored in main file">, 269 InGroup<DiagGroup<"pragma-system-header-outside-header">>; 270def pp_poisoning_existing_macro : Warning<"poisoning existing macro">; 271def pp_out_of_date_dependency : Warning< 272 "current file is older than dependency %0">; 273def ext_pp_undef_builtin_macro : ExtWarn<"undefining builtin macro">, 274 InGroup<BuiltinMacroRedefined>; 275def ext_pp_redef_builtin_macro : ExtWarn<"redefining builtin macro">, 276 InGroup<BuiltinMacroRedefined>; 277def pp_disabled_macro_expansion : Warning< 278 "disabled expansion of recursive macro">, DefaultIgnore, 279 InGroup<DiagGroup<"disabled-macro-expansion">>; 280def pp_macro_not_used : Warning<"macro is not used">, DefaultIgnore, 281 InGroup<DiagGroup<"unused-macros">>; 282def warn_pp_undef_identifier : Warning< 283 "%0 is not defined, evaluates to 0">, 284 InGroup<DiagGroup<"undef">>, DefaultIgnore; 285def warn_pp_ambiguous_macro : Warning< 286 "ambiguous expansion of macro %0">, InGroup<AmbiguousMacro>; 287def note_pp_ambiguous_macro_chosen : Note< 288 "expanding this definition of %0">; 289def note_pp_ambiguous_macro_other : Note< 290 "other definition of %0">; 291def warn_pp_macro_hides_keyword : Extension< 292 "keyword is hidden by macro definition">, InGroup<KeywordAsMacro>; 293def warn_pp_macro_is_reserved_id : Warning< 294 "macro name is a reserved identifier">, DefaultIgnore, 295 InGroup<ReservedIdAsMacro>; 296def warn_pp_objc_macro_redef_ignored : Warning< 297 "ignoring redefinition of Objective-C qualifier macro">, 298 InGroup<DiagGroup<"objc-macro-redefinition">>; 299 300def pp_invalid_string_literal : Warning< 301 "invalid string literal, ignoring final '\\'">; 302def warn_pp_expr_overflow : Warning< 303 "integer overflow in preprocessor expression">; 304def warn_pp_convert_to_positive : Warning< 305 "%select{left|right}0 side of operator converted from negative value to " 306 "unsigned: %1">; 307 308def ext_pp_import_directive : Extension<"#import is a language extension">, 309 InGroup<DiagGroup<"import-preprocessor-directive-pedantic">>; 310def err_pp_import_directive_ms : Error< 311 "#import of type library is an unsupported Microsoft feature">; 312def ext_pp_include_search_ms : ExtWarn< 313 "#include resolved using non-portable Microsoft search rules as: %0">, 314 InGroup<MicrosoftInclude>; 315 316def ext_pp_ident_directive : Extension<"#ident is a language extension">; 317def ext_pp_include_next_directive : Extension< 318 "#include_next is a language extension">, InGroup<GNUIncludeNext>; 319def ext_pp_warning_directive : Extension<"#warning is a language extension">; 320 321def ext_pp_extra_tokens_at_eol : ExtWarn< 322 "extra tokens at end of #%0 directive">, InGroup<ExtraTokens>; 323 324def ext_pp_comma_expr : Extension<"comma operator in operand of #if">; 325def ext_pp_bad_vaargs_use : Extension< 326 "__VA_ARGS__ can only appear in the expansion of a C99 variadic macro">; 327def ext_pp_macro_redef : ExtWarn<"%0 macro redefined">, InGroup<MacroRedefined>; 328def ext_variadic_macro : Extension<"variadic macros are a C99 feature">, 329 InGroup<VariadicMacros>; 330def warn_cxx98_compat_variadic_macro : Warning< 331 "variadic macros are incompatible with C++98">, 332 InGroup<CXX98CompatPedantic>, DefaultIgnore; 333def ext_named_variadic_macro : Extension< 334 "named variadic macros are a GNU extension">, InGroup<VariadicMacros>; 335def err_embedded_directive : Error< 336 "embedding a #%0 directive within macro arguments is not supported">; 337def ext_embedded_directive : Extension< 338 "embedding a directive within macro arguments has undefined behavior">, 339 InGroup<DiagGroup<"embedded-directive">>; 340def ext_missing_varargs_arg : Extension< 341 "must specify at least one argument for '...' parameter of variadic macro">, 342 InGroup<GNUZeroVariadicMacroArguments>; 343def ext_empty_fnmacro_arg : Extension< 344 "empty macro arguments are a C99 feature">, InGroup<C99>; 345def warn_cxx98_compat_empty_fnmacro_arg : Warning< 346 "empty macro arguments are incompatible with C++98">, 347 InGroup<CXX98CompatPedantic>, DefaultIgnore; 348def note_macro_here : Note<"macro %0 defined here">; 349 350def err_pp_opencl_variadic_macros : 351 Error<"variadic macros not supported in OpenCL">; 352 353def err_pp_invalid_directive : Error<"invalid preprocessing directive">; 354def err_pp_directive_required : Error< 355 "%0 must be used within a preprocessing directive">; 356def err_pp_file_not_found : Error<"'%0' file not found">, DefaultFatal; 357def err_pp_file_not_found_not_fatal : Error< 358 "'%0' file not found with <angled> include; use \"quotes\" instead">; 359def err_pp_error_opening_file : Error< 360 "error opening file '%0': %1">, DefaultFatal; 361def err_pp_empty_filename : Error<"empty filename">; 362def err_pp_include_too_deep : Error<"#include nested too deeply">; 363def err_pp_expects_filename : Error<"expected \"FILENAME\" or <FILENAME>">; 364def err_pp_macro_not_identifier : Error<"macro name must be an identifier">; 365def err_pp_missing_macro_name : Error<"macro name missing">; 366def err_pp_missing_rparen_in_macro_def : Error< 367 "missing ')' in macro parameter list">; 368def err_pp_invalid_tok_in_arg_list : Error< 369 "invalid token in macro parameter list">; 370def err_pp_expected_ident_in_arg_list : Error< 371 "expected identifier in macro parameter list">; 372def err_pp_expected_comma_in_arg_list : Error< 373 "expected comma in macro parameter list">; 374def err_pp_duplicate_name_in_arg_list : Error< 375 "duplicate macro parameter name %0">; 376def err_pp_stringize_not_parameter : Error< 377 "'#' is not followed by a macro parameter">; 378def err_pp_malformed_ident : Error<"invalid #ident directive">; 379def err_pp_unterminated_conditional : Error< 380 "unterminated conditional directive">; 381def pp_err_else_after_else : Error<"#else after #else">; 382def pp_err_elif_after_else : Error<"#elif after #else">; 383def pp_err_else_without_if : Error<"#else without #if">; 384def pp_err_elif_without_if : Error<"#elif without #if">; 385def err_pp_endif_without_if : Error<"#endif without #if">; 386def err_pp_expected_value_in_expr : Error<"expected value in expression">; 387def err_pp_expected_rparen : Error<"expected ')' in preprocessor expression">; 388def err_pp_expected_eol : Error< 389 "expected end of line in preprocessor expression">; 390def err_pp_expected_after : Error<"missing %1 after %0">; 391def err_pp_colon_without_question : Error<"':' without preceding '?'">; 392def err_pp_division_by_zero : Error< 393 "division by zero in preprocessor expression">; 394def err_pp_remainder_by_zero : Error< 395 "remainder by zero in preprocessor expression">; 396def err_pp_expr_bad_token_binop : Error< 397 "token is not a valid binary operator in a preprocessor subexpression">; 398def err_pp_expr_bad_token_start_expr : Error< 399 "invalid token at start of a preprocessor expression">; 400def err_pp_invalid_poison : Error<"can only poison identifier tokens">; 401def err_pp_used_poisoned_id : Error<"attempt to use a poisoned identifier">; 402 403def err_feature_check_malformed : Error< 404 "builtin feature check macro requires a parenthesized identifier">; 405 406def err_warning_check_malformed : Error< 407 "builtin warning check macro requires a parenthesized string">; 408def warn_has_warning_invalid_option : 409 ExtWarn<"__has_warning expected option name (e.g. \"-Wundef\")">, 410 InGroup<MalformedWarningCheck>; 411 412def err_pp_identifier_arg_not_identifier : Error< 413 "cannot convert %0 token to an identifier">; 414 415def warn_pragma_include_alias_mismatch_angle : 416 ExtWarn<"angle-bracketed include <%0> cannot be aliased to double-quoted " 417 "include \"%1\"">, InGroup<UnknownPragmas>; 418def warn_pragma_include_alias_mismatch_quote : 419 ExtWarn<"double-quoted include \"%0\" cannot be aliased to angle-bracketed " 420 "include <%1>">, InGroup<UnknownPragmas>; 421def warn_pragma_include_alias_expected : 422 ExtWarn<"pragma include_alias expected '%0'">, 423 InGroup<UnknownPragmas>; 424def warn_pragma_include_alias_expected_filename : 425 ExtWarn<"pragma include_alias expected include filename">, 426 InGroup<UnknownPragmas>; 427 428// - #pragma warning(...) 429def warn_pragma_warning_expected : 430 ExtWarn<"#pragma warning expected '%0'">, 431 InGroup<UnknownPragmas>; 432def warn_pragma_warning_spec_invalid : 433 ExtWarn<"#pragma warning expected 'push', 'pop', 'default', 'disable'," 434 " 'error', 'once', 'suppress', 1, 2, 3, or 4">, 435 InGroup<UnknownPragmas>; 436def warn_pragma_warning_push_level : 437 ExtWarn<"#pragma warning(push, level) requires a level between 0 and 4">, 438 InGroup<UnknownPragmas>; 439def warn_pragma_warning_expected_number : 440 ExtWarn<"#pragma warning expected a warning number">, 441 InGroup<UnknownPragmas>; 442 443def err__Pragma_malformed : Error< 444 "_Pragma takes a parenthesized string literal">; 445def err_pragma_message_malformed : Error< 446 "pragma %select{message|warning|error}0 requires parenthesized string">; 447def err_pragma_push_pop_macro_malformed : Error< 448 "pragma %0 requires a parenthesized string">; 449def warn_pragma_pop_macro_no_push : Warning< 450 "pragma pop_macro could not pop '%0', no matching push_macro">, 451 InGroup<IgnoredPragmas>; 452def warn_pragma_message : Warning<"%0">, 453 InGroup<PoundPragmaMessage>, DefaultWarnNoWerror; 454def err_pragma_message : Error<"%0">; 455def warn_pragma_ignored : Warning<"unknown pragma ignored">, 456 InGroup<UnknownPragmas>, DefaultIgnore; 457def ext_stdc_pragma_ignored : ExtWarn<"unknown pragma in STDC namespace">, 458 InGroup<UnknownPragmas>; 459def ext_on_off_switch_syntax : 460 ExtWarn<"expected 'ON' or 'OFF' or 'DEFAULT' in pragma">, 461 InGroup<UnknownPragmas>; 462def ext_pragma_syntax_eod : 463 ExtWarn<"expected end of directive in pragma">, 464 InGroup<UnknownPragmas>; 465def warn_stdc_fenv_access_not_supported : 466 Warning<"pragma STDC FENV_ACCESS ON is not supported, ignoring pragma">, 467 InGroup<UnknownPragmas>; 468def warn_pragma_diagnostic_invalid : 469 ExtWarn<"pragma diagnostic expected 'error', 'warning', 'ignored', 'fatal'," 470 " 'push', or 'pop'">, 471 InGroup<UnknownPragmas>; 472def warn_pragma_diagnostic_cannot_pop : 473 ExtWarn<"pragma diagnostic pop could not pop, no matching push">, 474 InGroup<UnknownPragmas>; 475def warn_pragma_diagnostic_invalid_option : 476 ExtWarn<"pragma diagnostic expected option name (e.g. \"-Wundef\")">, 477 InGroup<UnknownPragmas>; 478def warn_pragma_diagnostic_invalid_token : 479 ExtWarn<"unexpected token in pragma diagnostic">, 480 InGroup<UnknownPragmas>; 481def warn_pragma_diagnostic_unknown_warning : 482 ExtWarn<"unknown warning group '%0', ignored">, 483 InGroup<UnknownPragmas>; 484// - #pragma __debug 485def warn_pragma_debug_unexpected_command : Warning< 486 "unexpected debug command '%0'">, InGroup<IgnoredPragmas>; 487 488def err_defined_macro_name : Error<"'defined' cannot be used as a macro name">; 489def err_paste_at_start : Error< 490 "'##' cannot appear at start of macro expansion">; 491def err_paste_at_end : Error<"'##' cannot appear at end of macro expansion">; 492def ext_paste_comma : Extension< 493 "token pasting of ',' and __VA_ARGS__ is a GNU extension">, InGroup<GNUZeroVariadicMacroArguments>; 494def err_unterm_macro_invoc : Error< 495 "unterminated function-like macro invocation">; 496def err_too_many_args_in_macro_invoc : Error< 497 "too many arguments provided to function-like macro invocation">; 498def note_suggest_parens_for_macro : Note< 499 "parentheses are required around macro argument containing braced " 500 "initializer list">; 501def note_init_list_at_beginning_of_macro_argument : Note< 502 "cannot use initializer list at the beginning of a macro argument">; 503def err_too_few_args_in_macro_invoc : Error< 504 "too few arguments provided to function-like macro invocation">; 505def err_pp_bad_paste : Error< 506 "pasting formed '%0', an invalid preprocessing token">; 507def ext_pp_bad_paste_ms : ExtWarn< 508 "pasting formed '%0', an invalid preprocessing token">, DefaultError, 509 InGroup<DiagGroup<"invalid-token-paste">>; 510def err_pp_operator_used_as_macro_name : Error< 511 "C++ operator %0 (aka %1) used as a macro name">; 512def ext_pp_operator_used_as_macro_name : Extension< 513 err_pp_operator_used_as_macro_name.Text>, InGroup<MicrosoftCppMacro>; 514def err_pp_illegal_floating_literal : Error< 515 "floating point literal in preprocessor expression">; 516def err_pp_line_requires_integer : Error< 517 "#line directive requires a positive integer argument">; 518def ext_pp_line_zero : Extension< 519 "#line directive with zero argument is a GNU extension">, 520 InGroup<GNUZeroLineDirective>; 521def err_pp_line_invalid_filename : Error< 522 "invalid filename for #line directive">; 523def warn_pp_line_decimal : Warning< 524 "%select{#line|GNU line marker}0 directive interprets number as decimal, not octal">; 525def err_pp_line_digit_sequence : Error< 526 "%select{#line|GNU line marker}0 directive requires a simple digit sequence">; 527def err_pp_linemarker_requires_integer : Error< 528 "line marker directive requires a positive integer argument">; 529def err_pp_linemarker_invalid_filename : Error< 530 "invalid filename for line marker directive">; 531def err_pp_linemarker_invalid_flag : Error< 532 "invalid flag line marker directive">; 533def err_pp_linemarker_invalid_pop : Error< 534 "invalid line marker flag '2': cannot pop empty include stack">; 535def ext_pp_line_too_big : Extension< 536 "C requires #line number to be less than %0, allowed as extension">; 537def warn_cxx98_compat_pp_line_too_big : Warning< 538 "#line number greater than 32767 is incompatible with C++98">, 539 InGroup<CXX98CompatPedantic>, DefaultIgnore; 540 541def err_pp_visibility_non_macro : Error<"no macro named %0">; 542 543def err_pp_arc_cf_code_audited_syntax : Error<"expected 'begin' or 'end'">; 544def err_pp_double_begin_of_arc_cf_code_audited : Error< 545 "already inside '#pragma clang arc_cf_code_audited'">; 546def err_pp_unmatched_end_of_arc_cf_code_audited : Error< 547 "not currently inside '#pragma clang arc_cf_code_audited'">; 548def err_pp_include_in_arc_cf_code_audited : Error< 549 "cannot #include files inside '#pragma clang arc_cf_code_audited'">; 550def err_pp_eof_in_arc_cf_code_audited : Error< 551 "'#pragma clang arc_cf_code_audited' was not ended within this file">; 552 553def warn_pp_date_time : Warning< 554 "expansion of date or time macro is not reproducible">, 555 ShowInSystemHeader, DefaultIgnore, InGroup<DiagGroup<"date-time">>; 556 557// Module map parsing 558def err_mmap_unknown_token : Error<"skipping stray token">; 559def err_mmap_expected_module : Error<"expected module declaration">; 560def err_mmap_expected_module_name : Error<"expected module name">; 561def err_mmap_expected_lbrace : Error<"expected '{' to start module '%0'">; 562def err_mmap_expected_rbrace : Error<"expected '}'">; 563def note_mmap_lbrace_match : Note<"to match this '{'">; 564def err_mmap_expected_rsquare : Error<"expected ']' to close attribute">; 565def note_mmap_lsquare_match : Note<"to match this ']'">; 566def err_mmap_expected_member : Error< 567 "expected umbrella, header, submodule, or module export">; 568def err_mmap_expected_header : Error<"expected a header name after '%0'">; 569def err_mmap_expected_mmap_file : Error<"expected a module map file name">; 570def err_mmap_module_redefinition : Error< 571 "redefinition of module '%0'">; 572def note_mmap_prev_definition : Note<"previously defined here">; 573def err_mmap_umbrella_dir_not_found : Error< 574 "umbrella directory '%0' not found">; 575def err_mmap_umbrella_clash : Error< 576 "umbrella for module '%0' already covers this directory">; 577def err_mmap_module_id : Error< 578 "expected a module name or '*'">; 579def err_mmap_expected_library_name : Error< 580 "expected %select{library|framework}0 name as a string">; 581def err_mmap_config_macro_submodule : Error< 582 "configuration macros are only allowed in top-level modules">; 583def err_mmap_use_decl_submodule : Error< 584 "use declarations are only allowed in top-level modules">; 585def err_mmap_expected_config_macro : Error< 586 "expected configuration macro name after ','">; 587def err_mmap_expected_conflicts_comma : Error< 588 "expected ',' after conflicting module name">; 589def err_mmap_expected_conflicts_message : Error< 590 "expected a message describing the conflict with '%0'">; 591def err_mmap_missing_module_unqualified : Error< 592 "no module named '%0' visible from '%1'">; 593def err_mmap_missing_module_qualified : Error< 594 "no module named '%0' in '%1'">; 595def err_mmap_top_level_inferred_submodule : Error< 596 "only submodules and framework modules may be inferred with wildcard syntax">; 597def err_mmap_inferred_no_umbrella : Error< 598 "inferred submodules require a module with an umbrella">; 599def err_mmap_inferred_framework_submodule : Error< 600 "inferred submodule cannot be a framework submodule">; 601def err_mmap_explicit_inferred_framework : Error< 602 "inferred framework modules cannot be 'explicit'">; 603def err_mmap_missing_exclude_name : Error< 604 "expected excluded module name">; 605def err_mmap_inferred_redef : Error< 606 "redefinition of inferred submodule">; 607def err_mmap_expected_lbrace_wildcard : Error< 608 "expected '{' to start inferred submodule">; 609def err_mmap_expected_inferred_member : Error< 610 "expected %select{module exclusion with 'exclude'|'export *'}0">; 611def err_mmap_expected_export_wildcard : Error< 612 "only '*' can be exported from an inferred submodule">; 613def err_mmap_explicit_top_level : Error< 614 "'explicit' is not permitted on top-level modules">; 615def err_mmap_nested_submodule_id : Error< 616 "qualified module name can only be used to define modules at the top level">; 617def err_mmap_expected_feature : Error<"expected a feature name">; 618def err_mmap_expected_attribute : Error<"expected an attribute name">; 619def warn_mmap_unknown_attribute : Warning<"unknown attribute '%0'">, 620 InGroup<IgnoredAttributes>; 621 622def warn_auto_module_import : Warning< 623 "treating #%select{include|import|include_next|__include_macros}0 as an " 624 "import of module '%1'">, InGroup<AutoImport>, DefaultIgnore; 625def note_implicit_top_level_module_import_here : Note< 626 "submodule of top-level module '%0' implicitly imported here">; 627def warn_uncovered_module_header : Warning< 628 "umbrella header for module '%0' does not include header '%1'">, 629 InGroup<IncompleteUmbrella>; 630def err_expected_id_building_module : Error< 631 "expected a module name in '__building_module' expression">; 632def warn_use_of_private_header_outside_module : Warning< 633 "use of private header from outside its module: '%0'">, 634 InGroup<DiagGroup<"private-header">>, DefaultError; 635def err_undeclared_use_of_module : Error< 636 "module %0 does not depend on a module exporting '%1'">; 637def warn_non_modular_include_in_framework_module : Warning< 638 "include of non-modular header inside framework module '%0'">, 639 InGroup<NonModularIncludeInFrameworkModule>, DefaultIgnore; 640def warn_non_modular_include_in_module : Warning< 641 "include of non-modular header inside module '%0'">, 642 InGroup<NonModularIncludeInModule>, DefaultIgnore; 643def warn_module_conflict : Warning< 644 "module '%0' conflicts with already-imported module '%1': %2">, 645 InGroup<ModuleConflict>; 646 647def warn_header_guard : Warning< 648 "%0 is used as a header guard here, followed by #define of a different macro">, 649 InGroup<DiagGroup<"header-guard">>; 650def note_header_guard : Note< 651 "%0 is defined here; did you mean %1?">; 652 653let CategoryName = "Nullability Issue" in { 654 655def err_pp_assume_nonnull_syntax : Error<"expected 'begin' or 'end'">; 656def err_pp_double_begin_of_assume_nonnull : Error< 657 "already inside '#pragma clang assume_nonnull'">; 658def err_pp_unmatched_end_of_assume_nonnull : Error< 659 "not currently inside '#pragma clang assume_nonnull'">; 660def err_pp_include_in_assume_nonnull : Error< 661 "cannot #include files inside '#pragma clang assume_nonnull'">; 662def err_pp_eof_in_assume_nonnull : Error< 663 "'#pragma clang assume_nonnull' was not ended within this file">; 664 665} 666 667} 668