1//==--- DiagnosticLexKinds.td - liblex diagnostics ------------------------===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9//===----------------------------------------------------------------------===// 10// Lexer Diagnostics 11//===----------------------------------------------------------------------===// 12 13let Component = "Lex", CategoryName = "Lexical or Preprocessor Issue" in { 14 15def null_in_char_or_string : Warning< 16 "null character(s) preserved in %select{char|string}0 literal">, 17 InGroup<NullCharacter>; 18def null_in_file : Warning<"null character ignored">, InGroup<NullCharacter>; 19def warn_nested_block_comment : Warning<"'/*' within block comment">, 20 InGroup<Comment>; 21def escaped_newline_block_comment_end : Warning< 22 "escaped newline between */ characters at block comment end">, 23 InGroup<Comment>; 24def backslash_newline_space : Warning< 25 "backslash and newline separated by space">, 26 InGroup<DiagGroup<"backslash-newline-escape">>; 27 28// Digraphs. 29def warn_cxx98_compat_less_colon_colon : Warning< 30 "'<::' is treated as digraph '<:' (aka '[') followed by ':' in C++98">, 31 InGroup<CXX98Compat>, DefaultIgnore; 32 33def warn_cxx17_compat_spaceship : Warning< 34 "'<=>' operator is incompatible with C++ standards before C++20">, 35 InGroup<CXXPre20Compat>, DefaultIgnore; 36def warn_cxx20_compat_spaceship : Warning< 37 "'<=>' is a single token in C++20; " 38 "add a space to avoid a change in behavior">, 39 InGroup<CXX20Compat>; 40 41// Trigraphs. 42def trigraph_ignored : Warning<"trigraph ignored">, InGroup<Trigraphs>; 43def trigraph_ignored_block_comment : Warning< 44 "ignored trigraph would end block comment">, InGroup<Trigraphs>; 45def trigraph_ends_block_comment : Warning<"trigraph ends block comment">, 46 InGroup<Trigraphs>; 47def trigraph_converted : Warning<"trigraph converted to '%0' character">, 48 InGroup<Trigraphs>; 49 50def ext_multi_line_line_comment : Extension<"multi-line // comment">, 51 InGroup<Comment>; 52def ext_line_comment : Extension< 53 "// comments are not allowed in this language">, 54 InGroup<Comment>; 55def ext_no_newline_eof : Extension<"no newline at end of file">, 56 InGroup<NewlineEOF>; 57def warn_no_newline_eof : Warning<"no newline at end of file">, 58 InGroup<NewlineEOF>, DefaultIgnore; 59 60def warn_cxx98_compat_no_newline_eof : Warning< 61 "C++98 requires newline at end of file">, 62 InGroup<CXX98CompatPedantic>, DefaultIgnore; 63 64def ext_dollar_in_identifier : Extension<"'$' in identifier">, 65 InGroup<DiagGroup<"dollar-in-identifier-extension">>; 66def ext_charize_microsoft : Extension< 67 "charizing operator #@ is a Microsoft extension">, 68 InGroup<MicrosoftCharize>; 69def ext_comment_paste_microsoft : Extension< 70 "pasting two '/' tokens into a '//' comment is a Microsoft extension">, 71 InGroup<MicrosoftCommentPaste>; 72def ext_ctrl_z_eof_microsoft : Extension< 73 "treating Ctrl-Z as end-of-file is a Microsoft extension">, 74 InGroup<MicrosoftEndOfFile>; 75 76def ext_token_used : Extension<"extension used">, 77 InGroup<DiagGroup<"language-extension-token">>; 78 79def warn_cxx11_keyword : Warning<"'%0' is a keyword in C++11">, 80 InGroup<CXX11Compat>, DefaultIgnore; 81def warn_cxx20_keyword : Warning<"'%0' is a keyword in C++20">, 82 InGroup<CXX20Compat>, DefaultIgnore; 83def warn_c99_keyword : Warning<"'%0' is a keyword in C99">, 84 InGroup<C99Compat>, DefaultIgnore; 85def warn_c2x_keyword : Warning<"'%0' is a keyword in C2x">, 86 InGroup<C2xCompat>, DefaultIgnore; 87 88def ext_unterminated_char_or_string : ExtWarn< 89 "missing terminating %select{'|'\"'}0 character">, InGroup<InvalidPPToken>; 90def ext_empty_character : ExtWarn<"empty character constant">, 91 InGroup<InvalidPPToken>; 92def err_unterminated_block_comment : Error<"unterminated /* comment">; 93def err_invalid_character_to_charify : Error< 94 "invalid argument to convert to character">; 95def err_unterminated___pragma : Error<"missing terminating ')' character">; 96 97def err_conflict_marker : Error<"version control conflict marker in file">; 98 99def err_raw_delim_too_long : Error< 100 "raw string delimiter longer than 16 characters" 101 "; use PREFIX( )PREFIX to delimit raw string">; 102def err_invalid_char_raw_delim : Error< 103 "invalid character '%0' character in raw string delimiter" 104 "; use PREFIX( )PREFIX to delimit raw string">; 105def err_unterminated_raw_string : Error< 106 "raw string missing terminating delimiter )%0\"">; 107def warn_cxx98_compat_raw_string_literal : Warning< 108 "raw string literals are incompatible with C++98">, 109 InGroup<CXX98Compat>, DefaultIgnore; 110 111def warn_multichar_character_literal : Warning< 112 "multi-character character constant">, InGroup<MultiChar>; 113def warn_four_char_character_literal : Warning< 114 "multi-character character constant">, InGroup<FourByteMultiChar>, DefaultIgnore; 115 116 117// Unicode and UCNs 118def err_invalid_utf8 : Error< 119 "source file is not valid UTF-8">; 120def warn_invalid_utf8_in_comment : Extension< 121 "invalid UTF-8 in comment">, InGroup<DiagGroup<"invalid-utf8">>; 122def err_character_not_allowed : Error< 123 "unexpected character <U+%0>">; 124def err_character_not_allowed_identifier : Error< 125 "character <U+%0> not allowed %select{in|at the start of}1 an identifier">; 126def ext_unicode_whitespace : ExtWarn< 127 "treating Unicode character as whitespace">, 128 InGroup<DiagGroup<"unicode-whitespace">>; 129def warn_utf8_symbol_homoglyph : Warning< 130 "treating Unicode character <U+%0> as an identifier character rather than " 131 "as '%1' symbol">, InGroup<DiagGroup<"unicode-homoglyph">>; 132def warn_utf8_symbol_zero_width : Warning< 133 "identifier contains Unicode character <U+%0> that is invisible in " 134 "some environments">, InGroup<DiagGroup<"unicode-zero-width">>; 135def ext_mathematical_notation : ExtWarn< 136 "mathematical notation character <U+%0> in an identifier is a Clang extension">, 137 InGroup<DiagGroup<"mathematical-notation-identifier-extension">>; 138 139def ext_delimited_escape_sequence : Extension< 140 "%select{delimited|named}0 escape sequences are a " 141 "%select{Clang|C++23}1 extension">, 142 InGroup<DiagGroup<"delimited-escape-sequence-extension">>; 143 144def warn_cxx23_delimited_escape_sequence : Warning< 145 "%select{delimited|named}0 escape sequences are " 146 "incompatible with C++ standards before C++23">, 147 InGroup<CXXPre23Compat>, DefaultIgnore; 148 149def err_delimited_escape_empty : Error< 150 "delimited escape sequence cannot be empty">; 151def err_delimited_escape_missing_brace: Error< 152 "expected '{' after '\\%0' escape sequence">; 153def err_delimited_escape_invalid : Error< 154 "invalid digit '%0' in escape sequence">; 155def err_hex_escape_no_digits : Error< 156 "\\%0 used with no following hex digits">; 157def err_invalid_ucn_name : Error< 158 "'%0' is not a valid Unicode character name">; 159def note_invalid_ucn_name_loose_matching : Note< 160 "characters names in Unicode escape sequences are sensitive to case and whitespaces">; 161def note_invalid_ucn_name_candidate : Note< 162 "did you mean %0 ('%2' U+%1)?">; 163 164def warn_ucn_escape_no_digits : Warning< 165 "\\%0 used with no following hex digits; " 166 "treating as '\\' followed by identifier">, InGroup<Unicode>; 167def err_ucn_escape_incomplete : Error< 168 "incomplete universal character name">; 169def warn_delimited_ucn_incomplete : Warning< 170 "incomplete delimited universal character name; " 171 "treating as '\\' '%0' '{' identifier">, InGroup<Unicode>; 172def warn_delimited_ucn_empty : Warning< 173 "empty delimited universal character name; " 174 "treating as '\\' '%0' '{' '}'">, InGroup<Unicode>; 175def warn_ucn_escape_incomplete : Warning< 176 "incomplete universal character name; " 177 "treating as '\\' followed by identifier">, InGroup<Unicode>; 178def note_ucn_four_not_eight : Note<"did you mean to use '\\u'?">; 179 180def err_ucn_escape_basic_scs : Error< 181 "character '%0' cannot be specified by a universal character name">; 182def err_ucn_control_character : Error< 183 "universal character name refers to a control character">; 184def err_ucn_escape_invalid : Error<"invalid universal character">; 185def warn_ucn_escape_surrogate : Warning< 186 "universal character name refers to a surrogate character">, 187 InGroup<Unicode>; 188 189def warn_c99_compat_unicode_id : Warning< 190 "%select{using this character in an identifier|starting an identifier with " 191 "this character}0 is incompatible with C99">, 192 InGroup<C99Compat>, DefaultIgnore; 193 194def warn_cxx98_compat_literal_ucn_escape_basic_scs : Warning< 195 "specifying character '%0' with a universal character name " 196 "is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; 197def warn_cxx98_compat_literal_ucn_control_character : Warning< 198 "universal character name referring to a control character " 199 "is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; 200def warn_c2x_compat_literal_ucn_escape_basic_scs : Warning< 201 "specifying character '%0' with a universal character name is " 202 "incompatible with C standards before C2x">, 203 InGroup<CPre2xCompat>, DefaultIgnore; 204def warn_c2x_compat_literal_ucn_control_character : Warning< 205 "universal character name referring to a control character " 206 "is incompatible with C standards before C2x">, 207 InGroup<CPre2xCompat>, DefaultIgnore; 208def warn_ucn_not_valid_in_c89 : Warning< 209 "universal character names are only valid in C99 or C++; " 210 "treating as '\\' followed by identifier">, InGroup<Unicode>; 211def warn_ucn_not_valid_in_c89_literal : ExtWarn< 212 "universal character names are only valid in C99 or C++">, InGroup<Unicode>; 213 214 215// Literal 216def ext_nonstandard_escape : Extension< 217 "use of non-standard escape character '\\%0'">; 218def ext_unknown_escape : ExtWarn<"unknown escape sequence '\\%0'">, 219 InGroup<DiagGroup<"unknown-escape-sequence">>; 220def err_invalid_digit : Error< 221 "invalid digit '%0' in %select{decimal|octal|binary}1 constant">; 222def err_invalid_suffix_constant : Error< 223 "invalid suffix '%0' on %select{integer|floating|fixed-point}1 constant">; 224def warn_cxx11_compat_digit_separator : Warning< 225 "digit separators are incompatible with C++ standards before C++14">, 226 InGroup<CXXPre14Compat>, DefaultIgnore; 227def warn_c2x_compat_digit_separator : Warning< 228 "digit separators are incompatible with C standards before C2x">, 229 InGroup<CPre2xCompat>, DefaultIgnore; 230def err_digit_separator_not_between_digits : Error< 231 "digit separator cannot appear at %select{start|end}0 of digit sequence">; 232def warn_char_constant_too_large : Warning< 233 "character constant too long for its type">; 234def err_multichar_character_literal : Error< 235 "%select{wide|Unicode}0 character literals may not contain multiple characters">; 236def err_exponent_has_no_digits : Error<"exponent has no digits">; 237def err_hex_constant_requires : Error< 238 "hexadecimal floating %select{constant|literal}0 requires " 239 "%select{an exponent|a significand}1">; 240def ext_hex_constant_invalid : Extension< 241 "hexadecimal floating constants are a C99 feature">, InGroup<C99>; 242def ext_hex_literal_invalid : Extension< 243 "hexadecimal floating literals are a C++17 feature">, InGroup<CXX17>; 244def warn_cxx17_hex_literal : Warning< 245 "hexadecimal floating literals are incompatible with " 246 "C++ standards before C++17">, 247 InGroup<CXXPre17CompatPedantic>, DefaultIgnore; 248def ext_binary_literal : Extension< 249 "binary integer literals are a GNU extension">, InGroup<GNUBinaryLiteral>; 250def ext_binary_literal_cxx14 : Extension< 251 "binary integer literals are a C++14 extension">, InGroup<CXX14BinaryLiteral>; 252def warn_cxx11_compat_binary_literal : Warning< 253 "binary integer literals are incompatible with C++ standards before C++14">, 254 InGroup<CXXPre14CompatBinaryLiteral>, DefaultIgnore; 255def err_pascal_string_too_long : Error<"Pascal string is too long">; 256def err_escape_too_large : Error< 257 "%select{hex|octal}0 escape sequence out of range">; 258def ext_string_too_long : Extension<"string literal of length %0 exceeds " 259 "maximum length %1 that %select{C90|ISO C99|C++}2 compilers are required to " 260 "support">, InGroup<OverlengthStrings>; 261def err_character_too_large : Error< 262 "character too large for enclosing character literal type">; 263def warn_c99_compat_unicode_literal : Warning< 264 "unicode literals are incompatible with C99">, 265 InGroup<C99Compat>, DefaultIgnore; 266def warn_cxx98_compat_unicode_literal : Warning< 267 "unicode literals are incompatible with C++98">, 268 InGroup<CXX98Compat>, DefaultIgnore; 269def warn_cxx14_compat_u8_character_literal : Warning< 270 "unicode literals are incompatible with C++ standards before C++17">, 271 InGroup<CXXPre17Compat>, DefaultIgnore; 272def warn_cxx11_compat_user_defined_literal : Warning< 273 "identifier after literal will be treated as a user-defined literal suffix " 274 "in C++11">, InGroup<CXX11Compat>, DefaultIgnore; 275def warn_cxx11_compat_reserved_user_defined_literal : Warning< 276 "identifier after literal will be treated as a reserved user-defined literal " 277 "suffix in C++11">, 278 InGroup<CXX11CompatReservedUserDefinedLiteral>, DefaultIgnore; 279def ext_reserved_user_defined_literal : ExtWarn< 280 "invalid suffix on literal; C++11 requires a space between literal and " 281 "identifier">, InGroup<ReservedUserDefinedLiteral>, DefaultError; 282def ext_ms_reserved_user_defined_literal : ExtWarn< 283 "invalid suffix on literal; C++11 requires a space between literal and " 284 "identifier">, InGroup<ReservedUserDefinedLiteral>; 285def err_unsupported_string_concat : Error< 286 "unsupported non-standard concatenation of string literals">; 287 288def warn_unevaluated_string_prefix : Warning< 289 "encoding prefix '%0' on an unevaluated string literal has no effect" 290 "%select{| and is incompatible with c++2c}1">, 291 InGroup<DiagGroup<"invalid-unevaluated-string">>; 292def err_unevaluated_string_prefix : Error< 293 "an unevaluated string literal cannot have an encoding prefix">; 294def err_unevaluated_string_udl : Error< 295 "an unevaluated string literal cannot be a user-defined literal">; 296def err_unevaluated_string_invalid_escape_sequence : Error< 297 "invalid escape sequence '%0' in an unevaluated string literal">; 298def err_string_concat_mixed_suffix : Error< 299 "differing user-defined suffixes ('%0' and '%1') in string literal " 300 "concatenation">; 301def err_pp_invalid_udl : Error< 302 "%select{character|integer}0 literal with user-defined suffix " 303 "cannot be used in preprocessor constant expression">; 304def err_bad_string_encoding : Error< 305 "illegal character encoding in string literal">; 306def warn_bad_string_encoding : ExtWarn< 307 "illegal character encoding in string literal">, 308 InGroup<InvalidSourceEncoding>; 309def err_bad_character_encoding : Error< 310 "illegal character encoding in character literal">; 311def warn_bad_character_encoding : ExtWarn< 312 "illegal character encoding in character literal">, 313 InGroup<InvalidSourceEncoding>; 314def err_lexing_string : Error<"failure when lexing a string literal">; 315def err_lexing_char : Error<"failure when lexing a character literal">; 316def err_lexing_numeric : Error<"failure when lexing a numeric literal">; 317def err_placeholder_in_source : Error<"editor placeholder in source file">; 318 319//===----------------------------------------------------------------------===// 320// Preprocessor Diagnostics 321//===----------------------------------------------------------------------===// 322 323let CategoryName = "User-Defined Issue" in { 324def pp_hash_warning : Warning<"%0">, 325 InGroup<PoundWarning>, ShowInSystemHeader; 326def err_pp_hash_error : Error<"%0">; 327} 328 329def pp_include_next_in_primary : Warning< 330 "#include_next in primary source file; " 331 "will search from start of include path">, 332 InGroup<DiagGroup<"include-next-outside-header">>; 333def pp_include_macros_out_of_predefines : Error< 334 "the #__include_macros directive is only for internal use by -imacros">; 335def pp_include_next_absolute_path : Warning< 336 "#include_next in file found relative to primary source file or found by " 337 "absolute path; will search from start of include path">, 338 InGroup<DiagGroup<"include-next-absolute-path">>; 339def ext_c99_whitespace_required_after_macro_name : ExtWarn< 340 "ISO C99 requires whitespace after the macro name">, InGroup<C99>; 341def ext_missing_whitespace_after_macro_name : ExtWarn< 342 "whitespace required after macro name">; 343def warn_missing_whitespace_after_macro_name : Warning< 344 "whitespace recommended after macro name">; 345 346class NonportablePath : Warning< 347 "non-portable path to file '%0'; specified path differs in case from file" 348 " name on disk">; 349def pp_nonportable_path : NonportablePath, 350 InGroup<DiagGroup<"nonportable-include-path">>; 351def pp_nonportable_system_path : NonportablePath, DefaultIgnore, 352 InGroup<DiagGroup<"nonportable-system-include-path">>; 353 354def pp_pragma_once_in_main_file : Warning<"#pragma once in main file">, 355 InGroup<DiagGroup<"pragma-once-outside-header">>; 356def pp_pragma_sysheader_in_main_file : Warning< 357 "#pragma system_header ignored in main file">, 358 InGroup<DiagGroup<"pragma-system-header-outside-header">>; 359 360def err_illegal_use_of_flt_eval_macro : Error< 361 "'__FLT_EVAL_METHOD__' cannot be expanded inside a scope containing " 362 "'#pragma clang fp eval_method'">; 363 364def pp_poisoning_existing_macro : Warning<"poisoning existing macro">; 365def pp_out_of_date_dependency : Warning< 366 "current file is older than dependency %0">; 367def ext_pp_undef_builtin_macro : ExtWarn<"undefining builtin macro">, 368 InGroup<BuiltinMacroRedefined>; 369def ext_pp_redef_builtin_macro : ExtWarn<"redefining builtin macro">, 370 InGroup<BuiltinMacroRedefined>; 371def pp_disabled_macro_expansion : Warning< 372 "disabled expansion of recursive macro">, DefaultIgnore, 373 InGroup<DiagGroup<"disabled-macro-expansion">>; 374def pp_macro_not_used : Warning<"macro is not used">, DefaultIgnore, 375 InGroup<DiagGroup<"unused-macros">>; 376def warn_pp_undef_identifier : Warning< 377 "%0 is not defined, evaluates to 0">, 378 InGroup<DiagGroup<"undef">>, DefaultIgnore; 379def warn_pp_undef_prefix : Warning< 380 "%0 is not defined, evaluates to 0">, 381 InGroup<DiagGroup<"undef-prefix">>, DefaultIgnore; 382def warn_pp_ambiguous_macro : Warning< 383 "ambiguous expansion of macro %0">, InGroup<AmbiguousMacro>; 384def note_pp_ambiguous_macro_chosen : Note< 385 "expanding this definition of %0">; 386def note_pp_ambiguous_macro_other : Note< 387 "other definition of %0">; 388def warn_pp_macro_hides_keyword : Extension< 389 "keyword is hidden by macro definition">, InGroup<KeywordAsMacro>; 390def warn_pp_macro_is_reserved_id : Warning< 391 "macro name is a reserved identifier">, DefaultIgnore, 392 InGroup<ReservedIdAsMacro>; 393def warn_pp_objc_macro_redef_ignored : Warning< 394 "ignoring redefinition of Objective-C qualifier macro">, 395 InGroup<DiagGroup<"objc-macro-redefinition">>; 396 397def pp_invalid_string_literal : Warning< 398 "invalid string literal, ignoring final '\\'">; 399def warn_pp_expr_overflow : Warning< 400 "integer overflow in preprocessor expression">; 401def warn_pp_convert_to_positive : Warning< 402 "%select{left|right}0 side of operator converted from negative value to " 403 "unsigned: %1">; 404 405def ext_pp_import_directive : Extension<"#import is a language extension">, 406 InGroup<DiagGroup<"import-preprocessor-directive-pedantic">>; 407def err_pp_import_directive_ms : Error< 408 "#import of type library is an unsupported Microsoft feature">; 409def ext_pp_include_search_ms : ExtWarn< 410 "#include resolved using non-portable Microsoft search rules as: %0">, 411 InGroup<MicrosoftInclude>; 412 413def ext_pp_ident_directive : Extension<"#ident is a language extension">; 414def ext_pp_include_next_directive : Extension< 415 "#include_next is a language extension">, InGroup<GNUIncludeNext>; 416 417def ext_pp_warning_directive : Extension< 418 "#warning is a %select{C2x|C++23}0 extension">; 419def warn_cxx23_compat_warning_directive : Warning< 420 "#warning is incompatible with C++ standards before C++23">, 421 InGroup<CXXPre23Compat>, DefaultIgnore; 422def warn_c2x_compat_warning_directive : Warning< 423 "#warning is incompatible with C standards before C2x">, 424 InGroup<CPre2xCompat>, DefaultIgnore; 425 426def ext_pp_extra_tokens_at_eol : ExtWarn< 427 "extra tokens at end of #%0 directive">, InGroup<ExtraTokens>; 428 429def ext_pp_comma_expr : Extension<"comma operator in operand of #if">; 430def ext_pp_bad_vaargs_use : Extension< 431 "__VA_ARGS__ can only appear in the expansion of a C99 variadic macro">; 432 433def ext_pp_bad_vaopt_use 434 : ExtWarn< 435 "__VA_OPT__ can only appear in the expansion of a variadic macro">, 436 InGroup<VariadicMacros>; 437 438def err_pp_missing_lparen_in_vaopt_use : Error< 439 "missing '(' following __VA_OPT__">; 440def err_pp_vaopt_nested_use : Error< 441 "__VA_OPT__ cannot be nested within its own replacement tokens">; 442 443def err_vaopt_paste_at_start : Error< 444 "'##' cannot appear at start of __VA_OPT__ argument">; 445 446def err_vaopt_paste_at_end 447 : Error<"'##' cannot appear at end of __VA_OPT__ argument">; 448 449def ext_pp_macro_redef : ExtWarn<"%0 macro redefined">, InGroup<MacroRedefined>; 450def ext_variadic_macro : Extension<"variadic macros are a C99 feature">, 451 InGroup<VariadicMacros>; 452def warn_cxx98_compat_variadic_macro : Warning< 453 "variadic macros are incompatible with C++98">, 454 InGroup<CXX98CompatPedantic>, DefaultIgnore; 455def ext_named_variadic_macro : Extension< 456 "named variadic macros are a GNU extension">, InGroup<VariadicMacros>; 457def err_embedded_directive : Error< 458 "embedding a #%0 directive within macro arguments is not supported">; 459def ext_embedded_directive : Extension< 460 "embedding a directive within macro arguments has undefined behavior">, 461 InGroup<DiagGroup<"embedded-directive">>; 462def ext_missing_varargs_arg : Extension< 463 "must specify at least one argument for '...' parameter of variadic macro">, 464 InGroup<GNUZeroVariadicMacroArguments>; 465def warn_cxx17_compat_missing_varargs_arg : Warning< 466 "passing no argument for the '...' parameter of a variadic macro is " 467 "incompatible with C++ standards before C++20">, 468 InGroup<CXXPre20Compat>, DefaultIgnore; 469def ext_empty_fnmacro_arg : Extension< 470 "empty macro arguments are a C99 feature">, InGroup<C99>; 471def warn_cxx98_compat_empty_fnmacro_arg : Warning< 472 "empty macro arguments are incompatible with C++98">, 473 InGroup<CXX98CompatPedantic>, DefaultIgnore; 474def note_macro_here : Note<"macro %0 defined here">; 475def note_macro_expansion_here : Note<"expansion of macro %0 requested here">; 476 477def ext_pp_opencl_variadic_macros : Extension< 478 "variadic macros are a Clang extension in OpenCL">; 479 480def ext_pp_gnu_line_directive : Extension< 481 "this style of line directive is a GNU extension">, 482 InGroup<GNULineMarker>; 483def err_pp_invalid_directive : Error< 484 "invalid preprocessing directive%select{|, did you mean '#%1'?}0">; 485def warn_pp_invalid_directive : Warning< 486 err_pp_invalid_directive.Summary>, InGroup<DiagGroup<"unknown-directives">>; 487def err_pp_directive_required : Error< 488 "%0 must be used within a preprocessing directive">; 489def err_pp_file_not_found : Error<"'%0' file not found">, DefaultFatal; 490def err_pp_through_header_not_found : Error< 491 "'%0' required for precompiled header not found">, DefaultFatal; 492def err_pp_through_header_not_seen : Error< 493 "#include of '%0' not seen while attempting to " 494 "%select{create|use}1 precompiled header">, DefaultFatal; 495def err_pp_pragma_hdrstop_not_seen : Error< 496 "#pragma hdrstop not seen while attempting to use precompiled header">, 497 DefaultFatal; 498def warn_pp_macro_def_mismatch_with_pch : Warning< 499 "definition of macro %0 does not match definition in precompiled header">, 500 InGroup<ClangClPch>; 501def warn_pp_hdrstop_filename_ignored : Warning< 502 "#pragma hdrstop filename not supported, " 503 "/Fp can be used to specify precompiled header filename">, 504 InGroup<ClangClPch>; 505def remark_pp_search_path_usage : Remark< 506 "search path used: '%0'">, 507 InGroup<UsedSearchPath>; 508def err_pp_file_not_found_angled_include_not_fatal : Error< 509 "'%0' file not found with <angled> %select{include|import}1; " 510 "use \"quotes\" instead">; 511def err_pp_file_not_found_typo_not_fatal 512 : Error<"'%0' file not found, did you mean '%1'?">; 513def note_pp_framework_without_header : Note< 514 "did not find header '%0' in framework '%1' (loaded from '%2')">; 515def err_pp_error_opening_file : Error< 516 "error opening file '%0': %1">, DefaultFatal; 517def err_pp_including_mainfile_in_preamble : Error< 518 "main file cannot be included recursively when building a preamble">; 519def err_pp_empty_filename : Error<"empty filename">; 520def err_pp_include_too_deep : Error<"#include nested too deeply">; 521def err_pp_expects_filename : Error<"expected \"FILENAME\" or <FILENAME>">; 522def err_pp_macro_not_identifier : Error<"macro name must be an identifier">; 523def err_pp_missing_macro_name : Error<"macro name missing">; 524def err_pp_missing_rparen_in_macro_def : Error< 525 "missing ')' in macro parameter list">; 526def err_pp_invalid_tok_in_arg_list : Error< 527 "invalid token in macro parameter list">; 528def err_pp_expected_ident_in_arg_list : Error< 529 "expected identifier in macro parameter list">; 530def err_pp_expected_comma_in_arg_list : Error< 531 "expected comma in macro parameter list">; 532def err_pp_duplicate_name_in_arg_list : Error< 533 "duplicate macro parameter name %0">; 534def err_pp_stringize_not_parameter : Error< 535 "'%select{#|#@}0' is not followed by a macro parameter">; 536def err_pp_malformed_ident : Error<"invalid #ident directive">; 537def err_pp_unterminated_conditional : Error< 538 "unterminated conditional directive">; 539def pp_err_else_after_else : Error<"#else after #else">; 540def pp_err_elif_after_else : Error< 541 "%select{#elif|#elifdef|#elifndef}0 after #else">; 542def pp_err_else_without_if : Error<"#else without #if">; 543def pp_err_elif_without_if : Error< 544 "%select{#elif|#elifdef|#elifndef}0 without #if">; 545def err_pp_endif_without_if : Error<"#endif without #if">; 546def err_pp_expected_value_in_expr : Error<"expected value in expression">; 547def err_pp_expected_rparen : Error<"expected ')' in preprocessor expression">; 548def err_pp_expected_eol : Error< 549 "expected end of line in preprocessor expression">; 550def err_pp_expected_after : Error<"missing %1 after %0">; 551def err_pp_nested_paren : Error<"nested parentheses not permitted in %0">; 552def err_pp_colon_without_question : Error<"':' without preceding '?'">; 553def err_pp_division_by_zero : Error< 554 "division by zero in preprocessor expression">; 555def err_pp_remainder_by_zero : Error< 556 "remainder by zero in preprocessor expression">; 557def err_pp_expr_bad_token_binop : Error< 558 "token is not a valid binary operator in a preprocessor subexpression">; 559def err_pp_expr_bad_token_lparen : Error< 560 "function-like macro %0 is not defined">; 561def err_pp_expr_bad_token_start_expr : Error< 562 "invalid token at start of a preprocessor expression">; 563def err_pp_invalid_poison : Error<"can only poison identifier tokens">; 564def err_pp_used_poisoned_id : Error<"attempt to use a poisoned identifier">; 565 566def err_feature_check_malformed : Error< 567 "builtin feature check macro requires a parenthesized identifier">; 568 569def warn_has_warning_invalid_option : 570 ExtWarn<"__has_warning expected option name (e.g. \"-Wundef\")">, 571 InGroup<MalformedWarningCheck>; 572 573def err_pp_identifier_arg_not_identifier : Error< 574 "cannot convert %0 token to an identifier">; 575 576def warn_pragma_include_alias_mismatch_angle : 577 ExtWarn<"angle-bracketed include <%0> cannot be aliased to double-quoted " 578 "include \"%1\"">, InGroup<UnknownPragmas>; 579def warn_pragma_include_alias_mismatch_quote : 580 ExtWarn<"double-quoted include \"%0\" cannot be aliased to angle-bracketed " 581 "include <%1>">, InGroup<UnknownPragmas>; 582def warn_pragma_include_alias_expected : 583 ExtWarn<"pragma include_alias expected '%0'">, 584 InGroup<UnknownPragmas>; 585def warn_pragma_include_alias_expected_filename : 586 ExtWarn<"pragma include_alias expected include filename">, 587 InGroup<UnknownPragmas>; 588 589// - #pragma warning(...) 590def warn_pragma_warning_expected : 591 ExtWarn<"#pragma warning expected '%0'">, 592 InGroup<UnknownPragmas>; 593def warn_pragma_warning_spec_invalid : 594 ExtWarn<"#pragma warning expected 'push', 'pop', 'default', 'disable'," 595 " 'error', 'once', 'suppress', 1, 2, 3, or 4">, 596 InGroup<UnknownPragmas>; 597def warn_pragma_warning_push_level : 598 ExtWarn<"#pragma warning(push, level) requires a level between 0 and 4">, 599 InGroup<UnknownPragmas>; 600def warn_pragma_warning_expected_number : 601 ExtWarn<"#pragma warning expected a warning number">, 602 InGroup<UnknownPragmas>; 603 604// - #pragma deprecated(...) 605def warn_pragma_deprecated_macro_use : 606 ExtWarn<"macro %0 has been marked as deprecated%select{|: %2}1">, 607 InGroup<DeprecatedPragma>; 608 609// - #pragma clang restrict_expansion(...) 610def warn_pragma_restrict_expansion_macro_use : 611 ExtWarn<"macro %0 has been marked as unsafe for use in headers" 612 "%select{|: %2}1">, 613 InGroup<RestrictExpansionMacro>; 614 615// - Note for macro annotations. 616def note_pp_macro_annotation : 617 Note<"macro marked '%select{deprecated|restrict_expansion|final}0' here">; 618 619// - #pragma clang final(...) 620def warn_pragma_final_macro : 621 ExtWarn<"macro %0 has been marked as final and should not be " 622 "%select{undefined|redefined}1">, 623 InGroup<FinalMacro>, ShowInSystemHeader; 624 625// - #pragma execution_character_set(...) 626def warn_pragma_exec_charset_expected : 627 ExtWarn<"#pragma execution_character_set expected '%0'">, 628 InGroup<UnknownPragmas>; 629def warn_pragma_exec_charset_spec_invalid : 630 ExtWarn<"#pragma execution_character_set expected 'push' or 'pop'">, 631 InGroup<UnknownPragmas>; 632def warn_pragma_exec_charset_push_invalid : 633 ExtWarn<"#pragma execution_character_set invalid value '%0', only 'UTF-8' is supported">, 634 InGroup<UnknownPragmas>; 635 636def err__Pragma_malformed : Error< 637 "_Pragma takes a parenthesized string literal">; 638def err_pragma_message_malformed : Error< 639 "pragma %select{message|warning|error}0 requires parenthesized string">; 640def err_pragma_push_pop_macro_malformed : Error< 641 "pragma %0 requires a parenthesized string">; 642def warn_pragma_pop_macro_no_push : Warning< 643 "pragma pop_macro could not pop '%0', no matching push_macro">, 644 InGroup<IgnoredPragmas>; 645def warn_pragma_message : Warning<"%0">, 646 InGroup<PoundPragmaMessage>, DefaultWarnNoWerror; 647def err_pragma_message : Error<"%0">; 648def warn_pragma_ignored : Warning<"unknown pragma ignored">, 649 InGroup<UnknownPragmas>, DefaultIgnore; 650def ext_on_off_switch_syntax : 651 ExtWarn<"expected 'ON' or 'OFF' or 'DEFAULT' in pragma">, 652 InGroup<UnknownPragmas>; 653def ext_pragma_syntax_eod : 654 ExtWarn<"expected end of directive in pragma">, 655 InGroup<UnknownPragmas>; 656def warn_pragma_diagnostic_invalid : 657 ExtWarn<"pragma diagnostic expected 'error', 'warning', 'ignored', 'fatal'," 658 " 'push', or 'pop'">, 659 InGroup<UnknownPragmas>; 660def warn_pragma_diagnostic_cannot_pop : 661 ExtWarn<"pragma diagnostic pop could not pop, no matching push">, 662 InGroup<UnknownPragmas>; 663def warn_pragma_diagnostic_invalid_option : 664 ExtWarn<"pragma diagnostic expected option name (e.g. \"-Wundef\")">, 665 InGroup<UnknownPragmas>; 666def warn_pragma_diagnostic_invalid_token : 667 ExtWarn<"unexpected token in pragma diagnostic">, 668 InGroup<UnknownPragmas>; 669def warn_pragma_diagnostic_unknown_warning : 670 ExtWarn<"unknown warning group '%0', ignored">, 671 InGroup<UnknownWarningOption>; 672// - #pragma __debug 673def warn_pragma_debug_missing_command : Warning< 674 "missing debug command">, InGroup<IgnoredPragmas>; 675def warn_pragma_debug_unexpected_command : Warning< 676 "unexpected debug command '%0'">, InGroup<IgnoredPragmas>; 677def warn_pragma_debug_unknown_module : Warning< 678 "unknown module '%0'">, InGroup<IgnoredPragmas>; 679// #pragma module 680def err_pp_expected_module_name : Error< 681 "expected %select{identifier after '.' in |}0module name">; 682def err_pp_module_begin_wrong_module : Error< 683 "must specify '-fmodule-name=%0' to enter %select{|submodule of }1" 684 "this module%select{ (current module is %3)|}2">; 685def err_pp_module_begin_no_module_map : Error< 686 "no module map available for module %0">; 687def err_pp_module_begin_no_submodule : Error< 688 "submodule %0.%1 not declared in module map">; 689def err_pp_module_begin_without_module_end : Error< 690 "no matching '#pragma clang module end' for this " 691 "'#pragma clang module begin'">; 692def err_pp_module_end_without_module_begin : Error< 693 "no matching '#pragma clang module begin' for this " 694 "'#pragma clang module end'">; 695def note_pp_module_begin_here : Note< 696 "entering module '%0' due to this pragma">; 697def err_pp_module_build_missing_end : Error< 698 "no matching '#pragma clang module endbuild' for this '#pragma clang module build'">; 699 700def err_defined_macro_name : Error<"'defined' cannot be used as a macro name">; 701def err_paste_at_start : Error< 702 "'##' cannot appear at start of macro expansion">; 703def err_paste_at_end : Error<"'##' cannot appear at end of macro expansion">; 704def ext_paste_comma : Extension< 705 "token pasting of ',' and __VA_ARGS__ is a GNU extension">, InGroup<GNUZeroVariadicMacroArguments>; 706def err_unterm_macro_invoc : Error< 707 "unterminated function-like macro invocation">; 708def err_too_many_args_in_macro_invoc : Error< 709 "too many arguments provided to function-like macro invocation">; 710def note_suggest_parens_for_macro : Note< 711 "parentheses are required around macro argument containing braced " 712 "initializer list">; 713def note_init_list_at_beginning_of_macro_argument : Note< 714 "cannot use initializer list at the beginning of a macro argument">; 715def err_too_few_args_in_macro_invoc : Error< 716 "too few arguments provided to function-like macro invocation">; 717def err_pp_bad_paste : Error< 718 "pasting formed '%0', an invalid preprocessing token">; 719def ext_pp_bad_paste_ms : ExtWarn< 720 "pasting formed '%0', an invalid preprocessing token">, DefaultError, 721 InGroup<DiagGroup<"invalid-token-paste">>; 722def err_pp_operator_used_as_macro_name : Error< 723 "C++ operator %0 (aka %1) used as a macro name">; 724def ext_pp_operator_used_as_macro_name : Extension< 725 err_pp_operator_used_as_macro_name.Summary>, InGroup<MicrosoftCppMacro>; 726def err_pp_illegal_floating_literal : Error< 727 "floating point literal in preprocessor expression">; 728def err_pp_line_requires_integer : Error< 729 "#line directive requires a positive integer argument">; 730def ext_pp_line_zero : Extension< 731 "#line directive with zero argument is a GNU extension">, 732 InGroup<GNUZeroLineDirective>; 733def err_pp_line_invalid_filename : Error< 734 "invalid filename for #line directive">; 735def warn_pp_line_decimal : Warning< 736 "%select{#line|GNU line marker}0 directive interprets number as decimal, not octal">; 737def err_pp_line_digit_sequence : Error< 738 "%select{#line|GNU line marker}0 directive requires a simple digit sequence">; 739def err_pp_linemarker_requires_integer : Error< 740 "line marker directive requires a positive integer argument">; 741def err_pp_linemarker_invalid_filename : Error< 742 "invalid filename for line marker directive">; 743def err_pp_linemarker_invalid_flag : Error< 744 "invalid flag line marker directive">; 745def err_pp_linemarker_invalid_pop : Error< 746 "invalid line marker flag '2': cannot pop empty include stack">; 747def ext_pp_line_too_big : Extension< 748 "C requires #line number to be less than %0, allowed as extension">; 749def warn_cxx98_compat_pp_line_too_big : Warning< 750 "#line number greater than 32767 is incompatible with C++98">, 751 InGroup<CXX98CompatPedantic>, DefaultIgnore; 752 753def warn_c2x_compat_pp_directive : Warning< 754 "use of a '#%select{<BUG IF SEEN>|elifdef|elifndef}0' directive " 755 "is incompatible with C standards before C2x">, 756 InGroup<CPre2xCompat>, DefaultIgnore; 757def ext_c2x_pp_directive : ExtWarn< 758 "use of a '#%select{<BUG IF SEEN>|elifdef|elifndef}0' directive " 759 "is a C2x extension">, 760 InGroup<C2x>; 761def warn_cxx23_compat_pp_directive : Warning< 762 "use of a '#%select{<BUG IF SEEN>|elifdef|elifndef}0' directive " 763 "is incompatible with C++ standards before C++23">, 764 InGroup<CXXPre23Compat>, DefaultIgnore; 765def ext_cxx23_pp_directive : ExtWarn< 766 "use of a '#%select{<BUG IF SEEN>|elifdef|elifndef}0' directive " 767 "is a C++23 extension">, 768 InGroup<CXX23>; 769 770def err_pp_visibility_non_macro : Error<"no macro named %0">; 771 772def err_pp_arc_cf_code_audited_syntax : Error<"expected 'begin' or 'end'">; 773def err_pp_double_begin_of_arc_cf_code_audited : Error< 774 "already inside '#pragma clang arc_cf_code_audited'">; 775def err_pp_unmatched_end_of_arc_cf_code_audited : Error< 776 "not currently inside '#pragma clang arc_cf_code_audited'">; 777def err_pp_include_in_arc_cf_code_audited : Error< 778 "cannot %select{#include files|import headers}0 " 779 "inside '#pragma clang arc_cf_code_audited'">; 780def err_pp_eof_in_arc_cf_code_audited : Error< 781 "'#pragma clang arc_cf_code_audited' was not ended within this file">; 782 783def warn_pp_date_time : Warning< 784 "expansion of date or time macro is not reproducible">, 785 ShowInSystemHeader, DefaultIgnore, InGroup<DiagGroup<"date-time">>; 786 787// Module map parsing 788def err_mmap_unknown_token : Error<"skipping stray token">; 789def err_mmap_expected_module : Error<"expected module declaration">; 790def err_mmap_expected_module_name : Error<"expected module name">; 791def err_mmap_expected_lbrace : Error<"expected '{' to start module '%0'">; 792def err_mmap_expected_rbrace : Error<"expected '}'">; 793def note_mmap_lbrace_match : Note<"to match this '{'">; 794def err_mmap_expected_rsquare : Error<"expected ']' to close attribute">; 795def note_mmap_lsquare_match : Note<"to match this ']'">; 796def err_mmap_expected_member : Error< 797 "expected umbrella, header, submodule, or module export">; 798def err_mmap_expected_header : Error<"expected a header name after '%0'">; 799def err_mmap_expected_mmap_file : Error<"expected a module map file name">; 800def err_mmap_module_redefinition : Error< 801 "redefinition of module '%0'">; 802def note_mmap_prev_definition : Note<"previously defined here">; 803def err_mmap_umbrella_clash : Error< 804 "umbrella for module '%0' already covers this directory">; 805def err_mmap_module_id : Error< 806 "expected a module name or '*'">; 807def err_mmap_expected_library_name : Error< 808 "expected %select{library|framework}0 name as a string">; 809def err_mmap_config_macro_submodule : Error< 810 "configuration macros are only allowed in top-level modules">; 811def err_mmap_use_decl_submodule : Error< 812 "use declarations are only allowed in top-level modules">; 813def err_mmap_expected_config_macro : Error< 814 "expected configuration macro name after ','">; 815def err_mmap_expected_conflicts_comma : Error< 816 "expected ',' after conflicting module name">; 817def err_mmap_expected_conflicts_message : Error< 818 "expected a message describing the conflict with '%0'">; 819def err_mmap_missing_module_unqualified : Error< 820 "no module named '%0' visible from '%1'">; 821def err_mmap_missing_module_qualified : Error< 822 "no module named '%0' in '%1'">; 823def err_mmap_missing_parent_module: Error< 824 "no module named '%0' %select{found|in '%2'}1, " 825 "parent module must be defined before the submodule">; 826def err_mmap_top_level_inferred_submodule : Error< 827 "only submodules and framework modules may be inferred with wildcard syntax">; 828def err_mmap_inferred_no_umbrella : Error< 829 "inferred submodules require a module with an umbrella">; 830def err_mmap_inferred_framework_submodule : Error< 831 "inferred submodule cannot be a framework submodule">; 832def err_mmap_explicit_inferred_framework : Error< 833 "inferred framework modules cannot be 'explicit'">; 834def err_mmap_missing_exclude_name : Error< 835 "expected excluded module name">; 836def err_mmap_inferred_redef : Error< 837 "redefinition of inferred submodule">; 838def err_mmap_expected_lbrace_wildcard : Error< 839 "expected '{' to start inferred submodule">; 840def err_mmap_expected_inferred_member : Error< 841 "expected %select{module exclusion with 'exclude'|'export *'}0">; 842def err_mmap_expected_export_wildcard : Error< 843 "only '*' can be exported from an inferred submodule">; 844def err_mmap_explicit_top_level : Error< 845 "'explicit' is not permitted on top-level modules">; 846def err_mmap_nested_submodule_id : Error< 847 "qualified module name can only be used to define modules at the top level">; 848def err_mmap_expected_feature : Error<"expected a feature name">; 849def err_mmap_expected_attribute : Error<"expected an attribute name">; 850def warn_mmap_unknown_attribute : Warning<"unknown attribute '%0'">, 851 InGroup<IgnoredAttributes>; 852def warn_mmap_mismatched_private_submodule : Warning< 853 "private submodule '%0' in private module map, expected top-level module">, 854 InGroup<PrivateModule>; 855def warn_mmap_mismatched_private_module_name : Warning< 856 "expected canonical name for private module '%0'">, 857 InGroup<PrivateModule>; 858def note_mmap_rename_top_level_private_module : Note< 859 "rename '%0' to ensure it can be found by name">; 860def warn_mmap_incomplete_framework_module_declaration : Warning< 861 "skipping '%0' because module declaration of '%1' lacks the 'framework' qualifier">, 862 InGroup<IncompleteFrameworkModuleDeclaration>; 863def note_mmap_add_framework_keyword : Note< 864 "use 'framework module' to declare module '%0'">; 865 866def err_mmap_duplicate_header_attribute : Error< 867 "header attribute '%0' specified multiple times">; 868def err_mmap_invalid_header_attribute_value : Error< 869 "expected integer literal as value for header attribute '%0'">; 870def err_mmap_expected_header_attribute : Error< 871 "expected a header attribute name ('size' or 'mtime')">; 872def err_mmap_conflicting_export_as : Error< 873 "conflicting re-export of module '%0' as '%1' or '%2'">; 874def warn_mmap_redundant_export_as : Warning< 875 "module '%0' already re-exported as '%1'">, 876 InGroup<PrivateModule>; 877def err_mmap_submodule_export_as : Error< 878 "only top-level modules can be re-exported as public">; 879 880def warn_quoted_include_in_framework_header : Warning< 881 "double-quoted include \"%0\" in framework header, " 882 "expected angle-bracketed instead" 883 >, InGroup<FrameworkHdrQuotedInclude>, DefaultIgnore; 884def warn_framework_include_private_from_public : Warning< 885 "public framework header includes private framework header '%0'" 886 >, InGroup<FrameworkIncludePrivateFromPublic>; 887 888def remark_pp_include_directive_modular_translation : Remark< 889 "treating #%select{include|import|include_next|__include_macros}0 as an " 890 "import of module '%1'">, InGroup<ModuleIncludeDirectiveTranslation>; 891def note_implicit_top_level_module_import_here : Note< 892 "submodule of top-level module '%0' implicitly imported here">; 893def warn_uncovered_module_header : Warning< 894 "umbrella header for module '%0' does not include header '%1'">, 895 InGroup<IncompleteUmbrella>; 896def warn_mmap_umbrella_dir_not_found : Warning< 897 "umbrella directory '%0' not found">, 898 InGroup<IncompleteUmbrella>; 899def err_expected_id_building_module : Error< 900 "expected a module name in '__building_module' expression">; 901def warn_use_of_private_header_outside_module : Warning< 902 "use of private header from outside its module: '%0'">, 903 InGroup<DiagGroup<"private-header">>, DefaultError; 904def err_undeclared_use_of_module : Error< 905 "module %0 does not depend on a module exporting '%1'">; 906def err_undeclared_use_of_module_indirect : Error< 907 "module %0 does not directly depend on a module exporting '%1', which is part of indirectly-used module %2">; 908def warn_non_modular_include_in_framework_module : Warning< 909 "include of non-modular header inside framework module '%0': '%1'">, 910 InGroup<NonModularIncludeInFrameworkModule>, DefaultIgnore; 911def warn_non_modular_include_in_module : Warning< 912 "include of non-modular header inside module '%0': '%1'">, 913 InGroup<NonModularIncludeInModule>, DefaultIgnore; 914def warn_module_conflict : Warning< 915 "module '%0' conflicts with already-imported module '%1': %2">, 916 InGroup<ModuleConflict>; 917 918// C++20 modules 919def err_header_import_semi_in_macro : Error< 920 "semicolon terminating header import declaration cannot be produced " 921 "by a macro">; 922def err_header_import_not_header_unit : Error< 923 "header file %0 (aka '%1') cannot be imported because " 924 "it is not known to be a header unit">; 925 926def warn_header_guard : Warning< 927 "%0 is used as a header guard here, followed by #define of a different macro">, 928 InGroup<DiagGroup<"header-guard">>; 929def note_header_guard : Note< 930 "%0 is defined here; did you mean %1?">; 931 932def warn_defined_in_object_type_macro : Warning< 933 "macro expansion producing 'defined' has undefined behavior">, 934 InGroup<ExpansionToDefined>; 935def warn_defined_in_function_type_macro : Extension< 936 "macro expansion producing 'defined' has undefined behavior">, 937 InGroup<ExpansionToDefined>; 938 939let CategoryName = "Nullability Issue" in { 940 941def err_pp_assume_nonnull_syntax : Error<"expected 'begin' or 'end'">; 942def err_pp_double_begin_of_assume_nonnull : Error< 943 "already inside '#pragma clang assume_nonnull'">; 944def err_pp_unmatched_end_of_assume_nonnull : Error< 945 "not currently inside '#pragma clang assume_nonnull'">; 946def err_pp_include_in_assume_nonnull : Error< 947 "cannot %select{#include files|import headers}0 " 948 "inside '#pragma clang assume_nonnull'">; 949def err_pp_eof_in_assume_nonnull : Error< 950 "'#pragma clang assume_nonnull' was not ended within this file">; 951 952} 953 954let CategoryName = "Dependency Directive Source Scanner Issue" in { 955 956def err_dep_source_scanner_missing_semi_after_at_import : Error< 957 "could not find ';' after @import">; 958def err_dep_source_scanner_unexpected_tokens_at_import : Error< 959 "unexpected extra tokens at end of @import declaration">; 960 961} 962 963def err_pp_double_begin_pragma_unsafe_buffer_usage : 964Error<"already inside '#pragma unsafe_buffer_usage'">; 965 966def err_pp_unmatched_end_begin_pragma_unsafe_buffer_usage : 967Error<"not currently inside '#pragma unsafe_buffer_usage'">; 968 969def err_pp_unclosed_pragma_unsafe_buffer_usage : 970Error<"'#pragma unsafe_buffer_usage' was not ended">; 971 972def err_pp_pragma_unsafe_buffer_usage_syntax : 973Error<"Expected 'begin' or 'end'">; 974} 975