Switch diagnostics from .def to tablegen files. Please validate the Windows build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sebastian Redl 2009-03-14 12:00:12 +00:00
Родитель f4dc83c637
Коммит 3801d71fbe
25 изменённых файлов: 53 добавлений и 2310 удалений

Просмотреть файл

@ -47,6 +47,7 @@ install(DIRECTORY include
add_definitions( -D_GNU_SOURCE )
add_subdirectory(include)
add_subdirectory(lib)
add_subdirectory(Driver)

Просмотреть файл

@ -1,5 +1,5 @@
LEVEL = ../..
DIRS := lib Driver docs tools
DIRS := include lib Driver docs tools
include $(LEVEL)/Makefile.common

1
include/CMakeLists.txt Normal file
Просмотреть файл

@ -0,0 +1 @@
add_subdirectory(clang)

4
include/Makefile Normal file
Просмотреть файл

@ -0,0 +1,4 @@
LEVEL = ../../..
DIRS := clang
include $(LEVEL)/Makefile.common

Просмотреть файл

@ -17,7 +17,7 @@ namespace clang {
enum {
#define DIAG(ENUM,FLAGS,DESC) ENUM,
#define ASTSTART
#include "clang/Basic/DiagnosticASTKinds.def"
#include "clang/Basic/DiagnosticASTKinds.inc"
#undef DIAG
NUM_BUILTIN_AST_DIAGNOSTICS
};

Просмотреть файл

@ -17,7 +17,7 @@ namespace clang {
enum {
#define DIAG(ENUM,FLAGS,DESC) ENUM,
#define ANALYSISSTART
#include "clang/Basic/DiagnosticAnalysisKinds.def"
#include "clang/Basic/DiagnosticAnalysisKinds.inc"
#undef DIAG
NUM_BUILTIN_ANALYSIS_DIAGNOSTICS
};

Просмотреть файл

@ -0,0 +1,8 @@
tablegen(DiagnosticAnalysisKinds.inc -gen-clang-diags-def -clang-component=Analysis)
tablegen(DiagnosticASTKinds.inc -gen-clang-diags-def -clang-component=AST)
tablegen(DiagnosticCommonKinds.inc -gen-clang-diags-def -clang-component=Common)
tablegen(DiagnosticDriverKinds.inc -gen-clang-diags-def -clang-component=Driver)
tablegen(DiagnosticFrontendKinds.inc -gen-clang-diags-def -clang-component=Frontend)
tablegen(DiagnosticLexKinds.inc -gen-clang-diags-def -clang-component=Lex)
tablegen(DiagnosticParseKinds.inc -gen-clang-diags-def -clang-component=Parse)
tablegen(DiagnosticSemaKinds.inc -gen-clang-diags-def -clang-component=Sema)

Просмотреть файл

@ -50,7 +50,7 @@ namespace clang {
// Get typedefs for common diagnostics.
enum {
#define DIAG(ENUM,FLAGS,DESC) ENUM,
#include "clang/Basic/DiagnosticCommonKinds.def"
#include "clang/Basic/DiagnosticCommonKinds.inc"
NUM_BUILTIN_COMMON_DIAGNOSTICS
#undef DIAG
};

Просмотреть файл

@ -1,31 +0,0 @@
//==--- DiagnosticASTKinds.def - libast diagnostics -------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifdef ASTSTART
__ASTSTART = DIAG_START_AST,
#undef ASTSTART
#endif
//DIAG(note_comma_in_ice, NOTE,
// "C does not permit evaluated commas in an integer constant expression")
DIAG(note_expr_divide_by_zero, NOTE,
"division by zero")
// inline asm related.
DIAG(err_asm_invalid_escape, ERROR,
"invalid %% escape in inline assembly string")
DIAG(err_asm_unknown_symbolic_operand_name, ERROR,
"unknown symbolic operand name in inline assembly string")
DIAG(err_asm_unterminated_symbolic_operand_name, ERROR,
"unterminated symbolic operand name in inline assembly string")
DIAG(err_asm_empty_symbolic_operand_name, ERROR,
"empty symbolic operand name in inline assembly string")
DIAG(err_asm_invalid_operand_number, ERROR,
"invalid operand number in inline asm string")

Просмотреть файл

@ -1,16 +0,0 @@
//==--- DiagnosticAnalysisKinds.def - libanalysis diagnostics ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifdef ANALYSISSTART
__ANALYSISSTART = DIAG_START_ANALYSIS,
#undef ANALYSISSTART
#endif
// CHECK: use of uninitialized values
DIAG(warn_uninit_val, WARNING, "use of uninitialized variable")

Просмотреть файл

@ -1,71 +0,0 @@
//==--- DiagnosticCommonKinds.def - common diagnostics ----------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
// Common Helpers
//===----------------------------------------------------------------------===//
DIAG(note_previous_definition, NOTE,
"previous definition is here")
DIAG(note_previous_declaration, NOTE,
"previous declaration is here")
DIAG(note_previous_implicit_declaration, NOTE,
"previous implicit declaration is here")
DIAG(note_previous_use, NOTE,
"previous use is here")
DIAG(note_duplicate_case_prev, NOTE,
"previous case defined here")
DIAG(note_forward_declaration, NOTE,
"forward declaration of %0")
DIAG(note_type_being_defined, NOTE,
"definition of %0 is not complete until the closing '}'")
/// note_matching - this is used as a continuation of a previous diagnostic,
/// e.g. to specify the '(' when we expected a ')'.
DIAG(note_matching, NOTE,
"to match this '%0'")
DIAG(note_using_decl, NOTE,
"using")
DIAG(note_also_found_decl, NOTE,
"also found")
// Parse && Lex
DIAG(err_expected_colon, ERROR,
"expected ':'")
// Parse && Sema
DIAG(err_no_declarators, ERROR,
"declaration does not declare anything")
DIAG(err_param_redefinition, ERROR,
"redefinition of parameter %0")
DIAG(err_invalid_storage_class_in_func_decl, ERROR,
"invalid storage class specifier in function declarator")
DIAG(err_expected_namespace_name, ERROR,
"expected namespace name")
// Sema && Lex
DIAG(ext_longlong, EXTENSION,
"'long long' is an extension when C99 mode is not enabled")
DIAG(warn_integer_too_large, WARNING,
"integer constant is too large for its type")
DIAG(warn_integer_too_large_for_signed, WARNING,
"integer constant is so large that it is unsigned")
// Sema && AST
DIAG(note_invalid_subexpr_in_ice, NOTE,
"subexpression not valid in an integer constant expression")
// Driver
DIAG(pp_macro_not_used, WARNING, // -Wunused-macros
"macro is not used")
DIAG(err_pp_I_dash_not_supported, ERROR,
"-I- not supported, please use -iquote instead")
DIAG(warn_pp_undef_identifier, WARNING,
"%0 is not defined, evaluates to 0")

Просмотреть файл

@ -1,33 +0,0 @@
//==--- DiagnosticDriverKinds.def - libdriver diagnostics -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifdef DRIVERSTART
__DRIVERSTART = DIAG_START_DRIVER,
#undef DRIVERSTART
#endif
DIAG(err_drv_no_such_file, ERROR,
"no such file or directory: '%0'")
DIAG(err_drv_unsupported_opt, ERROR,
"unsupported option '%0'")
DIAG(err_drv_unknown_stdin_type, ERROR,
"-E or -x required when input is from standard input")
DIAG(err_drv_unknown_language, ERROR,
"language not recognized: '%0'")
DIAG(err_drv_invalid_opt_with_multiple_archs, ERROR,
"option '%0' cannot be used with multiple -arch options")
DIAG(err_drv_invalid_output_with_multiple_archs, ERROR,
"cannot use '%0' output with multiple -arch options")
DIAG(err_drv_no_input_files, ERROR,
"no input files")
DIAG(err_drv_use_of_Z_option, ERROR,
"unsupported use of internal gcc -Z option '%0'")
DIAG(warn_drv_input_file_unused, WARNING,
"%0: '%1' input file unused when '%2' is present")

Просмотреть файл

@ -1,20 +0,0 @@
//==--- DiagnosticFrontendKinds.def - frontend diagnostics ------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifdef FRONTENDSTART
__FRONTENDSTART = DIAG_START_FRONTEND,
#undef FRONTENDSTART
#endif
DIAG(err_fe_unknown_triple, ERROR,
"unknown target triple '%0', please use -triple or -arch")
DIAG(err_fe_error_reading, ERROR,
"error reading '%0'")
DIAG(err_fe_error_reading_stdin, ERROR,
"error reading stdin")

Просмотреть файл

@ -1,283 +0,0 @@
//==--- DiagnosticLexKinds.def - liblex diagnostics -------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
// Lexer Diagnostics
//===----------------------------------------------------------------------===//
#ifdef LEXSTART
__LEXSTART = DIAG_START_LEX,
#undef LEXSTART
#endif
DIAG(null_in_string, WARNING,
"null character(s) preserved in string literal")
DIAG(null_in_char , WARNING,
"null character(s) preserved in character literal")
DIAG(null_in_file , WARNING,
"null character ignored")
DIAG(warn_nested_block_comment, WARNING,
"'/*' within block comment")
DIAG(escaped_newline_block_comment_end, WARNING,
"escaped newline between */ characters at block comment end")
DIAG(backslash_newline_space, WARNING,
"backslash and newline separated by space")
// Trigraphs.
DIAG(trigraph_ignored, WARNING, "trigraph ignored")
DIAG(trigraph_ignored_block_comment, WARNING,
"ignored trigraph would end block comment")
DIAG(trigraph_ends_block_comment, WARNING,
"trigraph ends block comment")
DIAG(trigraph_converted, WARNING,
"trigraph converted to '%0' character")
DIAG(ext_multi_line_bcpl_comment, EXTENSION,
"multi-line // comment")
DIAG(ext_bcpl_comment, EXTENSION,
"// comments are not allowed in this language")
DIAG(ext_no_newline_eof, EXTENSION,
"no newline at end of file")
DIAG(ext_backslash_newline_eof, EXTENSION,
"backslash-newline at end of file")
DIAG(ext_dollar_in_identifier, EXTENSION,
"'$' in identifier")
DIAG(charize_microsoft_ext, EXTENSION,
"@# is a microsoft extension")
DIAG(ext_token_used, EXTENSION,
"extension used")
DIAG(err_unterminated_string, ERROR,
"missing terminating '\"' character")
DIAG(err_unterminated_char, ERROR,
"missing terminating ' character")
DIAG(err_unterminated_angled_string, ERROR,
"missing terminating '>' character")
DIAG(err_empty_character, ERROR,
"empty character constant")
DIAG(err_unterminated_block_comment, ERROR,
"unterminated /* comment")
DIAG(err_invalid_character_to_charify, ERROR,
"invalid argument to convert to character")
// Literal
DIAG(ext_nonstandard_escape, EXTENSION,
"use of non-standard escape character '\\%0'")
DIAG(ext_unknown_escape, EXTENSION,
"unknown escape sequence '\\%0'")
DIAG(err_hex_escape_no_digits, ERROR,
"\\x used with no following hex digits")
DIAG(err_invalid_decimal_digit, ERROR,
"invalid digit '%0' in decimal constant")
DIAG(err_invalid_binary_digit, ERROR,
"invalid digit '%0' in binary constant")
DIAG(err_invalid_octal_digit, ERROR,
"invalid digit '%0' in octal constant")
DIAG(err_invalid_suffix_integer_constant, ERROR,
"invalid suffix '%0' on integer constant")
DIAG(err_invalid_suffix_float_constant, ERROR,
"invalid suffix '%0' on floating constant")
DIAG(warn_extraneous_wide_char_constant, WARNING,
"extraneous characters in wide character constant ignored")
DIAG(warn_char_constant_too_large, WARNING,
"character constant too long for its type")
DIAG(err_exponent_has_no_digits, ERROR,
"exponent has no digits")
DIAG(ext_imaginary_constant, EXTENSION,
"imaginary constants are an extension")
DIAG(err_hexconstant_requires_exponent, ERROR,
"hexadecimal floating constants require an exponent")
DIAG(ext_hexconstant_invalid, EXTENSION,
"hexadecimal floating constants are a C99 feature")
DIAG(ext_binary_literal, EXTENSION,
"binary integer literals are an extension")
DIAG(err_pascal_string_too_long, ERROR,
"Pascal string is too long")
DIAG(warn_octal_escape_too_large, EXTWARN,
"octal escape sequence out of range")
DIAG(warn_hex_escape_too_large, EXTWARN,
"hex escape sequence out of range")
//===----------------------------------------------------------------------===//
// Preprocessor Diagnostics
//===----------------------------------------------------------------------===//
DIAG(pp_hash_warning, WARNING,
"#warning%0")
DIAG(pp_include_next_in_primary, WARNING,
"#include_next in primary source file")
DIAG(pp_include_next_absolute_path, WARNING,
"#include_next with absolute path")
DIAG(ext_c99_whitespace_required_after_macro_name, WARNING,
"ISO C99 requires whitespace after the macro name")
DIAG(pp_pragma_once_in_main_file, WARNING,
"#pragma once in main file")
DIAG(pp_pragma_sysheader_in_main_file, WARNING,
"#pragma system_header ignored in main file")
DIAG(pp_poisoning_existing_macro, WARNING,
"poisoning existing macro")
DIAG(pp_out_of_date_dependency, WARNING,
"current file is older than dependency %0")
DIAG(pp_undef_builtin_macro, WARNING,
"undefining builtin macro")
DIAG(pp_redef_builtin_macro, WARNING,
"redefining builtin macro")
DIAG(pp_invalid_string_literal, WARNING,
"invalid string literal, ignoring final '\\'")
DIAG(warn_pp_expr_overflow, WARNING,
"integer overflow in preprocessor expression")
DIAG(warn_pp_convert_lhs_to_positive, WARNING,
"left side of operator converted from negative value to unsigned: %0")
DIAG(warn_pp_convert_rhs_to_positive, WARNING,
"right side of operator converted from negative value to unsigned: %0")
DIAG(ext_pp_import_directive, EXTENSION,
"#import is a language extension")
DIAG(ext_pp_ident_directive, EXTENSION,
"#ident is a language extension")
DIAG(ext_pp_include_next_directive, EXTENSION,
"#include_next is a language extension")
DIAG(ext_pp_warning_directive, EXTENSION,
"#warning is a language extension")
DIAG(ext_pp_extra_tokens_at_eol, EXTENSION,
"extra tokens at end of %0 directive")
DIAG(ext_pp_comma_expr, EXTENSION,
"comma operator in operand of #if")
DIAG(ext_pp_bad_vaargs_use, EXTENSION,
"__VA_ARGS__ can only appear in the expansion of a C99 variadic macro")
DIAG(ext_pp_macro_redef, EXTWARN,
"%0 macro redefined")
DIAG(ext_variadic_macro, EXTENSION,
"variadic macros were introduced in C99")
DIAG(ext_named_variadic_macro, EXTENSION,
"named variadic macros are a GNU extension")
DIAG(ext_embedded_directive, EXTENSION,
"embedding a directive within macro arguments is not portable")
DIAG(ext_missing_varargs_arg, EXTENSION,
"varargs argument missing, but tolerated as an extension")
DIAG(ext_empty_fnmacro_arg, EXTENSION,
"empty macro arguments were standardized in C99")
DIAG(ext_pp_base_file, EXTENSION,
"__BASE_FILE__ is a language extension")
DIAG(ext_pp_include_level, EXTENSION,
"__INCLUDE_LEVEL__ is a language extension")
DIAG(ext_pp_timestamp, EXTENSION,
"__TIMESTAMP__ is a language extension")
DIAG(err_pp_invalid_directive, ERROR,
"invalid preprocessing directive")
DIAG(err_pp_hash_error, ERROR,
"#error%0")
DIAG(err_pp_file_not_found, ERROR,
"'%0' file not found")
DIAG(err_pp_empty_filename, ERROR,
"empty filename")
DIAG(err_pp_include_too_deep, ERROR,
"#include nested too deeply")
DIAG(err_pp_expects_filename, ERROR,
"expected \"FILENAME\" or <FILENAME>")
DIAG(err_pp_macro_not_identifier, ERROR,
"macro names must be identifiers")
DIAG(err_pp_missing_macro_name, ERROR,
"macro name missing")
DIAG(err_pp_missing_rparen_in_macro_def, ERROR,
"missing ')' in macro parameter list")
DIAG(err_pp_invalid_tok_in_arg_list, ERROR,
"invalid token in macro parameter list")
DIAG(err_pp_expected_ident_in_arg_list, ERROR,
"expected identifier in macro parameter list")
DIAG(err_pp_expected_comma_in_arg_list, ERROR,
"expected comma in macro parameter list")
DIAG(err_pp_duplicate_name_in_arg_list, ERROR,
"duplicate macro parameter name %0")
DIAG(err_pp_stringize_not_parameter, ERROR,
"'#' is not followed by a macro parameter")
DIAG(err_pp_malformed_ident, ERROR,
"invalid #ident directive")
DIAG(err_pp_unterminated_conditional, ERROR,
"unterminated conditional directive")
DIAG(pp_err_else_after_else, ERROR,
"#else after #else")
DIAG(pp_err_elif_after_else, ERROR,
"#elif after #else")
DIAG(pp_err_else_without_if, ERROR,
"#else without #if")
DIAG(pp_err_elif_without_if, ERROR,
"#elif without #if")
DIAG(err_pp_endif_without_if, ERROR,
"#endif without #if")
DIAG(err_pp_expected_value_in_expr, ERROR,
"expected value in expression")
DIAG(err_pp_missing_val_before_operator, ERROR,
"missing value before operator")
DIAG(err_pp_expected_rparen, ERROR,
"expected ')' in preprocessor expression")
DIAG(err_pp_expected_eol, ERROR,
"expected end of line in preprocessor expression")
DIAG(err_pp_defined_requires_identifier, ERROR,
"operator 'defined' requires an identifier")
DIAG(err_pp_missing_rparen, ERROR,
"missing ')' after 'defined'")
DIAG(err_pp_colon_without_question, ERROR,
"':' without preceding '?'")
DIAG(err_pp_division_by_zero, ERROR,
"division by zero in preprocessor expression")
DIAG(err_pp_remainder_by_zero, ERROR,
"remainder by zero in preprocessor expression")
DIAG(err_pp_expr_bad_token_binop, ERROR,
"token is not a valid binary operator in a preprocessor subexpression")
DIAG(err_pp_expr_bad_token_start_expr, ERROR,
"invalid token at start of a preprocessor expression")
DIAG(err_pp_invalid_poison, ERROR,
"can only poison identifier tokens")
DIAG(err_pp_used_poisoned_id, ERROR,
"attempt to use a poisoned identifier")
DIAG(err__Pragma_malformed, ERROR,
"_Pragma takes a parenthesized string literal")
DIAG(err_pragma_comment_malformed, ERROR,
"pragma comment requires parenthesized identifier and optional string")
DIAG(err_pragma_comment_unknown_kind, ERROR,
"unknown kind of pragma comment")
DIAG(err_defined_macro_name, ERROR,
"'defined' cannot be used as a macro name")
DIAG(err_paste_at_start, ERROR,
"'##' cannot appear at start of macro expansion")
DIAG(err_paste_at_end, ERROR,
"'##' cannot appear at end of macro expansion")
DIAG(ext_paste_comma, EXTENSION,
"Use of comma pasting extension is non-portable")
DIAG(err_unterm_macro_invoc, ERROR,
"unterminated function-like macro invocation")
DIAG(err_too_many_args_in_macro_invoc, ERROR,
"too many arguments provided to function-like macro invocation")
DIAG(err_too_few_args_in_macro_invoc, ERROR,
"too few arguments provided to function-like macro invocation")
DIAG(err_pp_bad_paste, ERROR,
"pasting formed '%0', an invalid preprocessing token")
DIAG(err_pp_operator_used_as_macro_name, ERROR,
"C++ operator '%0' cannot be used as a macro name")
DIAG(err_pp_illegal_floating_literal, ERROR,
"floating point literal in preprocessor expression")
DIAG(err_pp_line_requires_integer, ERROR,
"#line directive requires a positive integer argument")
DIAG(err_pp_line_invalid_filename, ERROR,
"invalid filename for #line directive")
DIAG(err_pp_linemarker_requires_integer, ERROR,
"line marker directive requires a positive integer argument")
DIAG(err_pp_linemarker_invalid_filename, ERROR,
"invalid filename for line marker directive")
DIAG(err_pp_linemarker_invalid_flag, ERROR,
"invalid flag line marker directive")
DIAG(err_pp_linemarker_invalid_pop, ERROR,
"invalid line marker flag '2': cannot pop empty include stack")
DIAG(ext_pp_line_too_big, EXTENSION,
"C requires #line number to be less than %0, allowed as extension")

Просмотреть файл

@ -1,303 +0,0 @@
//==--- DiagnosticParseKinds.def - libparse diagnostics ---------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
// Parser Diagnostics
//===----------------------------------------------------------------------===//
#ifdef PARSESTART
__PARSESTART = DIAG_START_PARSE,
#undef PARSESTART
#endif
DIAG(w_asm_qualifier_ignored, WARNING,
"ignored %0 qualifier on asm")
DIAG(ext_empty_source_file, EXTENSION,
"ISO C forbids an empty source file")
DIAG(ext_top_level_semi, EXTENSION,
"ISO C does not allow an extra ';' outside of a function")
DIAG(ext_extra_struct_semi, EXTENSION,
"ISO C does not allow an extra ';' inside a struct or union")
DIAG(ext_duplicate_declspec, EXTENSION,
"duplicate '%0' declaration specifier")
DIAG(ext_plain_complex, EXTENSION,
"ISO C does not support plain '_Complex' meaning '_Complex double'")
DIAG(ext_integer_complex, EXTENSION,
"ISO C does not support complex integer types")
DIAG(ext_thread_before, EXTENSION,
"'__thread' before 'static'")
DIAG(ext_empty_struct_union_enum, EXTENSION,
"use of empty %0 extension")
DIAG(err_invalid_sign_spec, ERROR,
"'%0' cannot be signed or unsigned")
DIAG(err_invalid_short_spec, ERROR,
"'short %0' is invalid")
DIAG(err_invalid_long_spec, ERROR,
"'long %0' is invalid")
DIAG(err_invalid_longlong_spec, ERROR,
"'long long %0' is invalid")
DIAG(err_invalid_complex_spec, ERROR,
"'_Complex %0' is invalid")
DIAG(err_invalid_thread_spec, ERROR,
"'__thread %0' is invalid")
DIAG(ext_ident_list_in_param, EXTENSION,
"type-less parameter names in function declaration")
DIAG(ext_c99_variable_decl_in_for_loop, EXTENSION,
"variable declaration in for loop is a C99-specific feature")
DIAG(ext_c99_compound_literal, EXTENSION,
"compound literals are a C99-specific feature")
DIAG(ext_c99_enumerator_list_comma, EXTENSION,
"commas at the end of enumerator lists are a C99-specific feature")
DIAG(ext_gnu_indirect_goto, EXTENSION,
"use of GNU indirect-goto extension")
DIAG(ext_gnu_address_of_label, EXTENSION,
"use of GNU address-of-label extension")
DIAG(ext_gnu_statement_expr, EXTENSION,
"use of GNU statement expression extension")
DIAG(ext_gnu_conditional_expr, EXTENSION,
"use of GNU ?: expression extension, eliding middle term")
DIAG(ext_gnu_empty_initializer, EXTENSION,
"use of GNU empty initializer extension")
DIAG(ext_gnu_array_range, EXTENSION,
"use of GNU array range extension")
DIAG(ext_gnu_missing_equal_designator, EXTENSION,
"use of GNU 'missing =' extension in designator")
DIAG(err_expected_equal_designator, ERROR,
"expected '=' or another designator")
DIAG(ext_gnu_old_style_field_designator, EXTENSION,
"use of GNU old-style field designator extension")
DIAG(ext_gnu_case_range, EXTENSION,
"use of GNU case range extension")
// Generic errors.
DIAG(err_parse_error, ERROR,
"parse error")
DIAG(err_expected_expression, ERROR,
"expected expression")
DIAG(err_expected_type, ERROR,
"expected a type")
DIAG(err_expected_external_declaration, ERROR,
"expected external declaration")
DIAG(err_expected_ident, ERROR,
"expected identifier")
DIAG(err_expected_ident_lparen, ERROR,
"expected identifier or '('")
DIAG(err_expected_ident_lbrace, ERROR,
"expected identifier or '{'")
DIAG(err_expected_lbrace, ERROR,
"expected '{'")
DIAG(err_expected_lparen, ERROR,
"expected '('")
DIAG(err_expected_rparen, ERROR,
"expected ')'")
DIAG(err_expected_rsquare, ERROR,
"expected ']'")
DIAG(err_expected_rbrace, ERROR,
"expected '}'")
DIAG(err_expected_greater, ERROR,
"expected '>'")
DIAG(err_expected_semi_decl_list, ERROR,
"expected ';' at end of declaration list")
DIAG(ext_expected_semi_decl_list, EXTENSION,
"expected ';' at end of declaration list")
DIAG(err_expected_member_name_or_semi, ERROR,
"expected member name or ';' after declaration specifiers")
DIAG(err_function_declared_typedef, ERROR,
"function definition declared 'typedef'")
DIAG(err_expected_fn_body, ERROR,
"expected function body after function declarator")
DIAG(err_expected_method_body, ERROR,
"expected method body")
DIAG(err_invalid_token_after_toplevel_declarator, ERROR,
"invalid token after top level declarator")
DIAG(err_expected_statement, ERROR,
"expected statement")
DIAG(err_expected_lparen_after, ERROR,
"expected '(' after '%0'")
DIAG(err_expected_lparen_after_id, ERROR,
"expected '(' after %0")
DIAG(err_expected_less_after, ERROR,
"expected '<' after '%0'")
DIAG(err_expected_comma, ERROR,
"expected ','")
DIAG(err_expected_lbrace_in_compound_literal, ERROR,
"expected '{' in compound literal")
DIAG(err_expected_while, ERROR,
"expected 'while' in do/while loop")
DIAG(err_expected_semi_after, ERROR,
"expected ';' after %0")
DIAG(err_expected_semi_after_expr, ERROR,
"expected ';' after expression")
DIAG(err_expected_semi_after_method_proto, ERROR,
"expected ';' after method prototype")
DIAG(err_expected_semi_after_static_assert, ERROR,
"expected ';' after static_assert")
DIAG(err_expected_semi_for, ERROR,
"expected ';' in 'for' statement specifier")
DIAG(err_expected_colon_after, ERROR,
"expected ':' after %0")
DIAG(err_label_end_of_compound_statement, ERROR,
"label at end of compound statement: expected statement")
DIAG(err_expected_string_literal, ERROR,
"expected string literal")
DIAG(err_expected_asm_operand, ERROR,
"expected string literal or '[' for asm operand")
DIAG(err_expected_selector_for_method, ERROR,
"expected selector for Objective-C method")
DIAG(err_unexpected_at, ERROR,
"unexpected '@' in program")
DIAG(err_invalid_reference_qualifier_application, ERROR,
"'%0' qualifier may not be applied to a reference")
DIAG(err_illegal_decl_reference_to_reference, ERROR,
"%0 declared as a reference to a reference")
DIAG(err_argument_required_after_attribute, ERROR,
"argument required after attribute")
DIAG(err_missing_param, ERROR,
"expected parameter declarator")
DIAG(err_unexpected_typedef_ident, ERROR,
"unexpected type name %0: expected identifier")
DIAG(err_expected_class_name, ERROR,
"expected class name")
DIAG(err_unspecified_vla_size_with_static, ERROR,
"'static' may not be used with an unspecified variable length array size")
// Declarations.
DIAG(err_typename_requires_specqual, ERROR,
"type name requires a specifier or qualifier")
DIAG(err_typename_invalid_storageclass, ERROR,
"type name does not allow storage class to be specified")
DIAG(err_typename_invalid_functionspec, ERROR,
"type name does not allow function specifier to be specified")
DIAG(err_invalid_decl_spec_combination, ERROR,
"cannot combine with previous '%0' declaration specifier")
/// Objective-C parser diagnostics
DIAG(err_objc_no_attributes_on_category, ERROR,
"attributes may not be specified on a category")
DIAG(err_objc_missing_end, ERROR,
"missing @end")
DIAG(warn_objc_protocol_qualifier_missing_id, WARNING,
"protocol qualifiers without 'id' is archaic")
DIAG(err_objc_illegal_visibility_spec, ERROR,
"illegal visibility specification")
DIAG(err_objc_illegal_interface_qual, ERROR,
"illegal interface qualifier")
DIAG(err_objc_expected_equal, ERROR,
"setter/getter expects '=' followed by name")
DIAG(err_objc_property_requires_field_name, ERROR,
"property requires fields to be named")
DIAG(err_objc_property_bitfield, ERROR,
"property name cannot be a bitfield")
DIAG(err_objc_expected_property_attr, ERROR,
"unknown property attribute %0")
DIAG(err_objc_propertoes_require_objc2, ERROR,
"properties are an Objective-C 2 feature")
DIAG(err_objc_unexpected_attr, ERROR,
"prefix attribute must be followed by an interface or protocol")
DIAG(err_objc_directive_only_in_protocol, ERROR,
"directive may only be specified in protocols only")
DIAG(err_missing_catch_finally, ERROR,
"@try statement without a @catch and @finally clause")
DIAG(err_objc_concat_string, ERROR,
"unexpected token after Objective-C string")
DIAG(err_missing_sel_definition, ERROR,
"cannot find definition of 'SEL'")
DIAG(err_missing_id_definition, ERROR,
"cannot find definition of 'id'")
DIAG(err_missing_proto_definition, ERROR,
"cannot find definition of 'Protocol'")
DIAG(err_missing_class_definition, ERROR,
"cannot find definition of 'Class'")
DIAG(warn_expected_implementation, WARNING,
"@end must appear in an @implementation context")
DIAG(error_property_ivar_decl, ERROR,
"property synthesize requires specification of an ivar")
DIAG(err_expected_field_designator, ERROR,
"expected a field designator, such as '.field = 4'")
DIAG(err_declaration_does_not_declare_param, ERROR,
"declaration does not declare a parameter")
DIAG(err_no_matching_param, ERROR,
"parameter named %0 is missing")
/// C++ parser diagnostics
DIAG(err_expected_unqualified_id, ERROR,
"expected unqualified-id")
DIAG(err_func_def_no_params, ERROR,
"function definition does not declare parameters")
DIAG(err_expected_lparen_after_type, ERROR,
"expected '(' for function-style cast or type construction")
DIAG(err_expected_equal_after_declarator, ERROR,
"expected '=' after declarator")
DIAG(warn_parens_disambiguated_as_function_decl, WARNING,
"parentheses were disambiguated as a function declarator")
DIAG(err_expected_member_or_base_name, ERROR,
"expected class member or base class name")
DIAG(ext_ellipsis_exception_spec, EXTENSION,
"exception specification of '...' is a Microsoft extension")
DIAG(err_expected_catch, ERROR,
"expected catch")
// C++ derived classes
DIAG(err_dup_virtual, ERROR,
"duplicate 'virtual' in base specifier")
// C++ operator overloading
DIAG(err_operator_missing_type_specifier, ERROR,
"missing type specifier after 'operator'")
// Classes.
DIAG(err_anon_type_definition, ERROR,
"declaration of anonymous %0 must be a definition")
/// C++ Templates
DIAG(err_expected_template, ERROR,
"expected template")
DIAG(err_expected_comma_greater, ERROR,
"expected ',' or '>' in template-parameter-list")
DIAG(err_expected_type_id_after, ERROR,
"expected type-id after '%0'")
DIAG(err_expected_class_before, ERROR,
"expected 'class' before '%0'")
DIAG(err_template_spec_syntax_non_template, ERROR,
"identifier followed by '<' indicates a class template specialization but %0 %select{does not refer to a template|refers to a function template|<unused>|refers to a template template parameter}1")
DIAG(err_id_after_template_in_nested_name_spec, ERROR,
"expected template name after 'template' keyword in nested name specifier")
DIAG(err_less_after_template_name_in_nested_name_spec, ERROR,
"expected '<' after 'template %0' in nested name specifier")
DIAG(err_two_right_angle_brackets_need_space, ERROR,
"a space is required between consecutive right angle brackets (use '> >')")
DIAG(warn_cxx0x_right_shift_in_template_arg, WARNING,
"use of right-shift operator ('>>') in template argument will require "
"parentheses in C++0x")
// Language specific pragmas
// #pragma pack
DIAG(warn_pragma_pack_expected_lparen, WARNING,
"missing '(' after '#pragma pack' - ignoring")
DIAG(warn_pragma_pack_expected_rparen, WARNING,
"missing ')' after '#pragma pack' - ignoring")
DIAG(warn_pragma_pack_invalid_action, WARNING,
"unknown action for '#pragma pack' - ignored")
DIAG(warn_pragma_pack_invalid_constant, WARNING,
"invalid constant for '#pragma pack', expected %0 - ignored")
DIAG(warn_pragma_pack_malformed, WARNING,
"expected integer or identifier in '#pragma pack' - ignored")

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,9 @@
LEVEL = ../../../../..
BUILT_SOURCES = DiagnosticAnalysisKinds.inc DiagnosticASTKinds.inc \
DiagnosticCommonKinds.inc DiagnosticDriverKinds.inc \
DiagnosticFrontendKinds.inc DiagnosticLexKinds.inc \
DiagnosticParseKinds.inc DiagnosticSemaKinds.inc
CLANG_BUILD_DIAGNOSTICS_INC = 1
include $(LEVEL)/Makefile.common

Просмотреть файл

@ -0,0 +1 @@
add_subdirectory(Basic)

Просмотреть файл

@ -17,7 +17,7 @@ namespace clang {
enum {
#define DIAG(ENUM,FLAGS,DESC) ENUM,
#define DRIVERSTART
#include "clang/Basic/DiagnosticDriverKinds.def"
#include "clang/Basic/DiagnosticDriverKinds.inc"
#undef DIAG
NUM_BUILTIN_DRIVER_DIAGNOSTICS
};

Просмотреть файл

@ -17,7 +17,7 @@ namespace clang {
enum {
#define DIAG(ENUM,FLAGS,DESC) ENUM,
#define FRONTENDSTART
#include "clang/Basic/DiagnosticFrontendKinds.def"
#include "clang/Basic/DiagnosticFrontendKinds.inc"
#undef DIAG
NUM_BUILTIN_FRONTEND_DIAGNOSTICS
};

Просмотреть файл

@ -17,7 +17,7 @@ namespace clang {
enum {
#define DIAG(ENUM,FLAGS,DESC) ENUM,
#define LEXSTART
#include "clang/Basic/DiagnosticLexKinds.def"
#include "clang/Basic/DiagnosticLexKinds.inc"
#undef DIAG
NUM_BUILTIN_LEX_DIAGNOSTICS
};

4
include/clang/Makefile Normal file
Просмотреть файл

@ -0,0 +1,4 @@
LEVEL = ../../../..
DIRS := Basic
include $(LEVEL)/Makefile.common

Просмотреть файл

@ -17,7 +17,7 @@ namespace clang {
enum {
#define DIAG(ENUM,FLAGS,DESC) ENUM,
#define PARSESTART
#include "clang/Basic/DiagnosticParseKinds.def"
#include "clang/Basic/DiagnosticParseKinds.inc"
#undef DIAG
NUM_BUILTIN_PARSE_DIAGNOSTICS
};

Просмотреть файл

@ -17,7 +17,7 @@ namespace clang {
enum {
#define DIAG(ENUM,FLAGS,DESC) ENUM,
#define SEMASTART
#include "clang/Basic/DiagnosticSemaKinds.def"
#include "clang/Basic/DiagnosticSemaKinds.inc"
#undef DIAG
NUM_BUILTIN_SEMA_DIAGNOSTICS
};

Просмотреть файл

@ -41,35 +41,35 @@ enum {
/// diagnostic.
#define DIAG(ENUM,FLAGS,DESC) FLAGS,
static unsigned char DiagnosticFlagsCommon[] = {
#include "clang/Basic/DiagnosticCommonKinds.def"
#include "clang/Basic/DiagnosticCommonKinds.inc"
0
};
static unsigned char DiagnosticFlagsDriver[] = {
#include "clang/Basic/DiagnosticDriverKinds.def"
#include "clang/Basic/DiagnosticDriverKinds.inc"
0
};
static unsigned char DiagnosticFlagsFrontend[] = {
#include "clang/Basic/DiagnosticFrontendKinds.def"
#include "clang/Basic/DiagnosticFrontendKinds.inc"
0
};
static unsigned char DiagnosticFlagsLex[] = {
#include "clang/Basic/DiagnosticLexKinds.def"
#include "clang/Basic/DiagnosticLexKinds.inc"
0
};
static unsigned char DiagnosticFlagsParse[] = {
#include "clang/Basic/DiagnosticParseKinds.def"
#include "clang/Basic/DiagnosticParseKinds.inc"
0
};
static unsigned char DiagnosticFlagsAST[] = {
#include "clang/Basic/DiagnosticASTKinds.def"
#include "clang/Basic/DiagnosticASTKinds.inc"
0
};
static unsigned char DiagnosticFlagsSema[] = {
#include "clang/Basic/DiagnosticSemaKinds.def"
#include "clang/Basic/DiagnosticSemaKinds.inc"
0
};
static unsigned char DiagnosticFlagsAnalysis[] = {
#include "clang/Basic/DiagnosticAnalysisKinds.def"
#include "clang/Basic/DiagnosticAnalysisKinds.inc"
0
};
#undef DIAG
@ -103,35 +103,35 @@ static unsigned getBuiltinDiagClass(unsigned DiagID) {
/// should be localized.
#define DIAG(ENUM,FLAGS,DESC) DESC,
static const char * const DiagnosticTextCommon[] = {
#include "clang/Basic/DiagnosticCommonKinds.def"
#include "clang/Basic/DiagnosticCommonKinds.inc"
0
};
static const char * const DiagnosticTextDriver[] = {
#include "clang/Basic/DiagnosticDriverKinds.def"
#include "clang/Basic/DiagnosticDriverKinds.inc"
0
};
static const char * const DiagnosticTextFrontend[] = {
#include "clang/Basic/DiagnosticFrontendKinds.def"
#include "clang/Basic/DiagnosticFrontendKinds.inc"
0
};
static const char * const DiagnosticTextLex[] = {
#include "clang/Basic/DiagnosticLexKinds.def"
#include "clang/Basic/DiagnosticLexKinds.inc"
0
};
static const char * const DiagnosticTextParse[] = {
#include "clang/Basic/DiagnosticParseKinds.def"
#include "clang/Basic/DiagnosticParseKinds.inc"
0
};
static const char * const DiagnosticTextAST[] = {
#include "clang/Basic/DiagnosticASTKinds.def"
#include "clang/Basic/DiagnosticASTKinds.inc"
0
};
static const char * const DiagnosticTextSema[] = {
#include "clang/Basic/DiagnosticSemaKinds.def"
#include "clang/Basic/DiagnosticSemaKinds.inc"
0
};
static const char * const DiagnosticTextAnalysis[] = {
#include "clang/Basic/DiagnosticAnalysisKinds.def"
#include "clang/Basic/DiagnosticAnalysisKinds.inc"
0
};
#undef DIAG