//===-- DiagnosticKinds.def - C Family Diagnostic Kind Database -*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the DiagnosticKind database.
//
//===----------------------------------------------------------------------===//
// Flags for diagnostic:
//
// DIAG_TYPE - Allows one of:
// NOTE - Informational message.
// WARNING - Warning.
// EXTENSION - Notification that an extension to the language is being used.
// EXTWARN - Warning for behaviour that is supported as an extension. This
// differs from EXTENSION in that the warning is always emitted
// by default.
// ERROR - Error, compilation will stop after parsing completes.
//===----------------------------------------------------------------------===//
// Lexer Diagnostics
//===----------------------------------------------------------------------===//
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(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_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")
//===----------------------------------------------------------------------===//
// 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_macro_not_used, WARNING, // -Wunused-macros
"macro is not used")
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