//==--- DiagnosticSemaKinds.def - libsema diagnostics -----------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Semantic Analysis
//
//===----------------------------------------------------------------------===//
#ifdef SEMASTART
__SEMASTART = DIAG_START_SEMA,
#undef SEMASTART
#endif
// Constant expressions
DIAG(err_expr_not_ice, ERROR,
"expression is not an integer constant expression")
DIAG(ext_expr_not_ice, EXTENSION,
"expression is not integer constant expression "
"(but is allowed as an extension)")
DIAG(ext_null_pointer_expr_not_ice, EXTENSION,
"null pointer expression is not an integer constant expression "
"(but is allowed as an extension)")
// Semantic analysis of string and character constant literals.
DIAG(ext_predef_outside_function, WARNING,
"predefined identifier is only valid inside function")
// C99 Designated Initializers
DIAG(err_array_designator_nonconstant, ERROR,
"array designator value must be a constant expression")
DIAG(err_array_designator_negative, ERROR,
"array designator value '%0' is negative")
DIAG(err_array_designator_empty_range, ERROR,
"array designator range [%0, %1] is empty")
DIAG(err_array_designator_non_array, ERROR,
"array designator cannot initialize non-array type %0")
DIAG(err_array_designator_too_large, ERROR,
"array designator index (%0) exceeds array bounds (%1)")
DIAG(err_field_designator_non_aggr, ERROR,
"field designator cannot initialize a %select{non-struct, non-union|non-class}0 type %1")
DIAG(err_field_designator_unknown, ERROR,
"field designator %0 does not refer to any field in type %1")
DIAG(err_field_designator_nonfield, ERROR,
"field designator %0 does not refer to a non-static data member")
DIAG(note_field_designator_found, NOTE,
"field designator refers here")
DIAG(err_field_designator_anon_class, ERROR,
"field designator %0 refers to a member of an anonymous %select{struct|class|union}1")
DIAG(err_designator_for_scalar_init, ERROR,
"designator in initializer for scalar type %0")
DIAG(warn_subobject_initializer_overrides, WARNING,
"subobject initialization overrides initialization of other fields within its enclosing subobject")
DIAG(warn_initializer_overrides, WARNING,
"initializer overrides prior initialization of this subobject")
DIAG(note_previous_initializer, NOTE,
"previous initialization %select{|with side effects }0is here%select{| (side effects may not occur at run time)}0")
// Declarations.
DIAG(ext_vla, EXTENSION,
"variable length arrays are a C99 feature, accepted as an extension")
DIAG(ext_anon_param_requires_type_specifier, EXTENSION,
"type specifier required for unnamed parameter, defaults to int")
DIAG(err_bad_variable_name, ERROR,
"'%0' cannot be the name of a variable or data member")
DIAG(err_parameter_name_omitted, ERROR,
"parameter name omitted")
DIAG(warn_decl_in_param_list, WARNING,
"declaration of %0 will not be visible outside of this function")
DIAG(warn_implicit_function_decl, WARNING,
"implicit declaration of function %0")
DIAG(err_declarator_need_ident, ERROR,
"declarator requires an identifier")
DIAG(err_bad_language, ERROR,
"unknown linkage language")
/// parser diagnostics
DIAG(ext_typedef_without_a_name, EXTWARN,
"typedef requires a name")
DIAG(err_statically_allocated_object, ERROR,
"statically allocated Objective-C object %0")
DIAG(warn_enum_value_overflow, WARNING,
"overflow in enumeration value")
DIAG(warn_pragma_pack_invalid_alignment, WARNING,
"expected #pragma pack parameter to be '1', '2', '4', '8', or '16'")
// Follow the MSVC implementation.
DIAG(warn_pragma_pack_show, WARNING,
"value of #pragma pack(show) == %0")
// FIXME: Dehardcode.
DIAG(warn_pragma_pack_pop_identifer_and_alignment, WARNING,
"specifying both a name and alignment to 'pop' is undefined")
DIAG(warn_pragma_pack_pop_failed, WARNING,
"#pragma pack(pop, ...) failed: %0")
/// Objective-C parser diagnostics
DIAG(err_duplicate_class_def, ERROR,
"duplicate interface definition for class %0")
DIAG(err_undef_superclass, ERROR,
"cannot find interface declaration for %0, superclass of %1")
DIAG(warn_previous_alias_decl, WARNING,
"previously declared alias is ignored")
DIAG(err_conflicting_aliasing_type, ERROR,
"c