| //==--- 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") |
| DIAG(err_designator_into_flexible_array_member, ERROR, |
| "designator into flexible array member subobject") |
| DIAG(note_flexible_array_member, NOTE, |
| "initialized flexible array member %0 is here") |
| |
| // 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_ellipsis_first_arg, ERROR, |
| "ISO C requires a named argument before '...'") |
| DIAG(err_declarator_need_ident, ERROR, |
| "declarator requires an identifier") |
| DIAG(err_bad_language, ERROR, |
| "unknown linkage language") |
| DIAG(warn_use_out_of_scope_declaration, WARNING, |
| "use of out-of-scope declaration of %0") |
| |
| /// Built-in functions. |
| DIAG(ext_implicit_lib_function_decl, EXTWARN, |
| "implicitly declaring C library function '%0' with type %1") |
| DIAG(note_please_include_header, NOTE, |
| "please include the header <%0> or explicitly provide a declaration for '%1'") |
| DIAG(note_previous_builtin_declaration, NOTE, |
| "%0 is a builtin with type %1") |
| DIAG(err_implicit_decl_requires_stdio, ERROR, |
| "implicit declaration of '%0' requires inclusion of the header <stdio.h>") |
| DIAG(warn_redecl_library_builtin, WARNING, |
| "incompatible redeclaration of library function %0 will be ignored") |
| DIAG(err_builtin_definition, ERROR, |
| "definition of builtin function %0") |
| |
| /// parser diagnostics |
| DIAG(ext_typedef_without_a_name, EXTWARN, |
| "typedef requires a name") |
| DIAG(err_statically_allocated_object, ERROR, |
| "Objective-C type cannot be statically allocated") |
| DIAG(err_object_cannot_be_by_value, ERROR, |
| "Objective-C type cannot be %0 by value") |
| 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, |
| "conflicting types for alias %0") |
| DIAG(warn_undef_interface, WARNING, |
| "cannot find interface declaration for %0") |
| DIAG(err_duplicate_protocol_def, ERROR, |
| "duplicate protocol definition of %0") |
| DIAG(err_protocol_has_circular_dependency, ERROR, |
| "protocol has circular dependency") |
| DIAG(err_undeclared_protocol, ERROR, |
| "cannot find protocol declaration for %0") |
| DIAG(warn_undef_protocolref, WARNING, |
| "cannot find protocol definition for %0") |
| DIAG(warn_readonly_property, WARNING, |
| "attribute 'readonly' of property %0 restricts attribute " |
| "'readwrite' of property inherited from %1") |
| DIAG(warn_property_attribute, WARNING, |
| "property %0 '%1' attribute does not match the property inherited from %2") |
| DIAG(warn_property_types_are_incompatible, WARNING, |
| "property type %0 is incompatible with type %1 inherited from %2") |
| DIAG(err_undef_interface, ERROR, |
| "cannot find interface declaration for %0") |
| DIAG(warn_dup_category_def, WARNING, |
| "duplicate definition of category %1 on interface %0") |
| DIAG(err_conflicting_super_class, ERROR, |
| "conflicting super class name %0") |
| DIAG(err_dup_implementation_class, ERROR, |
| "reimplementation of class %0") |
| DIAG(err_conflicting_ivar_type, ERROR, |
| "instance variable %0 has conflicting type: %1 vs %2") |
| DIAG(err_conflicting_ivar_bitwidth, ERROR, |
| "instance variable %0 has conflicting bitfield width") |
| DIAG(err_conflicting_ivar_name, ERROR, |
| "conflicting instance variable names: %0 vs %1") |
| DIAG(err_inconsistant_ivar_count, ERROR, |
| "inconsistent number of instance variables specified") |
| DIAG(warn_incomplete_impl, WARNING, |
| "incomplete implementation") |
| DIAG(warn_undef_method_impl, WARNING, |
| "method definition for %0 not found") |
| DIAG(warn_conflicting_types, WARNING, |
| "conflicting types for %0") |
| DIAG(warn_multiple_method_decl, WARNING, |
| "multiple methods named %0 found") |
| DIAG(err_accessor_property_type_mismatch, ERROR, |
| "type of property %0 does not match type of accessor %1") |
| DIAG(note_declared_at, NOTE, |
| "declared at") |
| DIAG(err_setter_type_void, ERROR, |
| "type of setter must be void") |
| DIAG(err_duplicate_method_decl, ERROR, |
| "duplicate declaration of method %0") |
| DIAG(error_missing_method_context, ERROR, |
| "missing context for method declaration") |
| DIAG(err_objc_property_attr_mutually_exclusive, ERROR, |
| "property attributes '%0' and '%1' are mutually exclusive") |
| DIAG(err_objc_property_requires_object, ERROR, |
| "property with '%0' attribute must be of object type") |
| DIAG(warn_objc_property_no_assignment_attribute, WARNING, |
| "no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed") |
| DIAG(warn_objc_property_default_assign_on_object, WARNING, |
| "default property attribute 'assign' not appropriate for non-gc object") |
| DIAG(warn_property_attr_mismatch, WARNING, |
| "property attribute in continuation class does not match the primary class") |
| DIAG(err_use_continuation_class, ERROR, |
| "attribute of property in continuation class of %0 can only be 'readwrite'") |
| DIAG(err_continuation_class, ERROR, |
| "continuation class has no primary class") |
| DIAG(err_property_type, ERROR, |
| "property cannot have array or function type %0") |
| DIAG(error_missing_property_context, ERROR, |
| "missing context for property implementation declaration") |
| DIAG(error_bad_property_decl, ERROR, |
| "property implementation must have its declaration in interface %0") |
| DIAG(error_synthesize_category_decl, ERROR, |
| "@synthesize not allowed in a category's implementation") |
| DIAG(error_missing_property_interface, ERROR, |
| "property implementation in a category with no category declaration") |
| DIAG(error_bad_category_property_decl, ERROR, |
| "property implementation must have its declaration in the category %0") |
| DIAG(error_bad_property_context, ERROR, |
| "property implementation must be in a class or category implementation") |
| DIAG(error_missing_property_ivar_decl, ERROR, |
| "synthesized property %0 must either be named the same as a compatible" |
| " ivar or must explicitly name an ivar") |
| DIAG(error_synthesized_ivar_yet_not_supported, ERROR, |
| "instance variable synthesis not yet supported" |
| " (need to declare %0 explicitly)") |
| DIAG(error_property_ivar_type, ERROR, |
| "type of property %0 does not match type of ivar %1") |
| DIAG(error_weak_property, ERROR, |
| "existing ivar %1 for __weak property %0 must be __weak") |
| DIAG(error_strong_property, ERROR, |
| "existing ivar %1 for a __strong property %0 must be garbage collectable") |
| DIAG(error_dynamic_property_ivar_decl, ERROR, |
| "dynamic property can not have ivar specification") |
| DIAG(error_duplicate_ivar_use, ERROR, |
| "synthesized properties %0 and %1 both claim ivar %2") |
| DIAG(error_property_implemented, ERROR, |
| "property %0 is already implemented") |
| DIAG(warn_objc_property_attr_mutually_exclusive, WARNING, |
| "property attributes '%0' and '%1' are mutually exclusive") |
| |
| // C++ declarations |
| DIAG(err_static_assert_expression_is_not_constant, ERROR, |
| "static_assert expression is not an integral constant expression") |
| DIAG(err_static_assert_failed, ERROR, |
| "static_assert failed \"%0\"") |
| |
| // C++ name lookup |
| DIAG(err_incomplete_nested_name_spec, ERROR, |
| "incomplete type %0 named in nested name specifier") |
| |
| // C++ class members |
| DIAG(err_storageclass_invalid_for_member, ERROR, |
| "storage class specified for a member declaration") |
| DIAG(err_mutable_function, ERROR, |
| "'mutable' cannot be applied to functions") |
| DIAG(err_mutable_reference, ERROR, |
| "'mutable' cannot be applied to references") |
| DIAG(err_mutable_const, ERROR, |
| "'mutable' and 'const' cannot be mixed") |
| DIAG(err_mutable_nonmember, ERROR, |
| "'mutable' can only be applied to member variables") |
| DIAG(err_virtual_non_function, ERROR, |
| "'virtual' can only appear on non-static member functions") |
| DIAG(err_virtual_out_of_class, ERROR, |
| "'virtual' can only be specified inside the class definition") |
| DIAG(err_static_not_bitfield, ERROR, |
| "static member %0 cannot be a bit-field") |
| DIAG(err_static_out_of_line, ERROR, |
| "'static' can not be specified on an out-of-line static member definition") |
| DIAG(err_typedef_not_bitfield, ERROR, |
| "typedef member %0 cannot be a bit-field") |
| DIAG(err_not_integral_type_bitfield, ERROR, |
| "bit-field %0 has non-integral type %1") |
| DIAG(err_member_initialization, ERROR, |
| "%0 can only be initialized if it is a static const integral data member") |
| DIAG(err_member_function_initialization, ERROR, |
| "initializer on function does not look like a pure-specifier") |
| DIAG(err_non_virtual_pure, ERROR, |
| "%0 is not virtual and cannot be declared pure") |
| DIAG(err_implicit_object_parameter_init, ERROR, |
| "cannot initialize object parameter of type %0 with an expression of type %1") |
| |
| // C++ constructors |
| DIAG(err_constructor_cannot_be, ERROR, |
| "constructor cannot be declared '%0'") |
| DIAG(err_invalid_qualified_constructor, ERROR, |
| "'%0' qualifier is not allowed on a constructor") |
| DIAG(err_constructor_return_type, ERROR, |
| "constructor cannot have a return type") |
| DIAG(err_constructor_redeclared, ERROR, |
| "constructor cannot be redeclared") |
| DIAG(err_constructor_byvalue_arg, ERROR, |
| "copy constructor must pass its first argument by reference") |
| |
| // C++ destructors |
| DIAG(err_destructor_not_member, ERROR, |
| "destructor must be a non-static member function") |
| DIAG(err_destructor_cannot_be, ERROR, |
| "destructor cannot be declared '%0'") |
| DIAG(err_invalid_qualified_destructor, ERROR, |
| "'%0' qualifier is not allowed on a destructor") |
| DIAG(err_destructor_return_type, ERROR, |
| "destructor cannot have a return type") |
| DIAG(err_destructor_redeclared, ERROR, |
| "destructor cannot be redeclared") |
| DIAG(err_destructor_with_params, ERROR, |
| "destructor cannot have any parameters") |
| DIAG(err_destructor_variadic, ERROR, |
| "destructor cannot be variadic") |
| DIAG(err_destructor_typedef_name, ERROR, |
| "destructor cannot be declared using a typedef %0 of the class name") |
| |
| // C++ initialization |
| // FIXME: passing in an English string as %1! |
| DIAG(err_not_reference_to_const_init, ERROR, |
| "non-const reference to type %0 cannot be initialized with a %1 of type %2") |
| // FIXME: passing in an English string as %1! |
| DIAG(err_reference_init_drops_quals, ERROR, |
| "initialization of reference to type %0 with a %1 of type %2 drops qualifiers") |
| DIAG(err_reference_var_requires_init, ERROR, |
| "declaration of reference variable %0 requires an initializer") |
| DIAG(err_const_var_requires_init, ERROR, |
| "declaration of const variable '%0' requires an initializer") |
| DIAG(err_init_non_aggr_init_list, ERROR, |
| "initialization of non-aggregate type %0 with an initializer list") |
| DIAG(err_init_reference_member_uninitialized, ERROR, |
| "reference member of type %0 uninitialized") |
| DIAG(note_uninit_reference_member, NOTE, |
| "uninitialized reference member is here") |
| |
| // Objective-C++ |
| DIAG(err_objc_decls_may_only_appear_in_global_scope, ERROR, |
| "Objective-C declarations may only appear in global scope") |
| DIAG(err_nsobject_attribute, ERROR, |
| "__attribute ((NSObject)) is for pointer types only") |
| |
| // Attributes |
| DIAG(err_attribute_can_be_applied_only_to_symbol_declaration, ERROR, |
| "%0 attribute can be applied only to symbol declaration") |
| DIAG(err_attributes_are_not_compatible, ERROR, |
| "%0 and %1 attributes are not compatible") |
| DIAG(err_attribute_wrong_number_arguments, ERROR, |
| "attribute requires %0 argument(s)") |
| DIAG(err_attribute_missing_parameter_name, ERROR, |
| "attribute requires unquoted parameter") |
| DIAG(err_attribute_invalid_vector_type, ERROR, |
| "invalid vector type %0") |
| DIAG(err_attribute_argument_not_int, ERROR, |
| "'%0' attribute requires integer constant") |
| DIAG(err_attribute_argument_n_not_int, ERROR, |
| "'%0' attribute requires parameter %1 to be an integer constant") |
| DIAG(err_attribute_argument_n_not_string, ERROR, |
| "'%0' attribute requires parameter %1 to be a string") |
| DIAG(err_attribute_argument_out_of_bounds, ERROR, |
| "'%0' attribute parameter %1 is out of bounds") |
| DIAG(err_attribute_requires_objc_interface, ERROR, |
| "attribute may only be applied to an Objective-C interface") |
| DIAG(err_nonnull_pointers_only, ERROR, |
| "nonnull attribute only applies to pointer arguments") |
| DIAG(err_format_strftime_third_parameter, ERROR, |
| "strftime format attribute requires 3rd parameter to be 0") |
| DIAG(err_format_attribute_requires_variadic, ERROR, |
| "format attribute requires variadic function") |
| DIAG(err_format_attribute_not, ERROR, |
| "format argument not %0") |
| DIAG(err_attribute_invalid_size, ERROR, |
| "vector size not an integral multiple of component size") |
| DIAG(err_attribute_zero_size, ERROR, |
| "zero vector size") |
| DIAG(err_typecheck_vector_not_convertable, ERROR, |
| "can't convert between vector values of different size (%0 and %1)") |
| DIAG(err_typecheck_ext_vector_not_typedef, ERROR, |
| "ext_vector_type only applies to types, not variables") |
| DIAG(err_ext_vector_component_exceeds_length, ERROR, |
| "vector component access exceeds type %0") |
| DIAG(err_ext_vector_component_requires_even, ERROR, |
| "vector component access invalid for odd-sized type %0") |
| DIAG(err_ext_vector_component_name_illegal, ERROR, |
| "illegal vector component name '%0'") |
| DIAG(err_attribute_address_space_not_int, ERROR, |
| "address space attribute requires an integer constant") |
| DIAG(err_attribute_address_multiple_qualifiers, ERROR, |
| "multiple address spaces specified for type") |
| DIAG(err_implicit_pointer_address_space_cast, ERROR, |
| "illegal implicit cast between two pointers with different address spaces") |
| DIAG(err_as_qualified_auto_decl, ERROR, |
| "automatic variable qualified with an address space") |
| DIAG(err_attribute_annotate_no_string, ERROR, |
| "argument to annotate attribute was not a string literal") |
| DIAG(err_attribute_aligned_not_power_of_two, ERROR, |
| "requested alignment is not a power of 2") |
| DIAG(warn_redeclaration_without_attribute_prev_attribute_ignored, WARNING, |
| "'%0' redeclared without %1 attribute: previous %1 ignored") |
| DIAG(warn_attribute_ignored, WARNING, |
| "%0 attribute ignored") |
| DIAG(warn_attribute_weak_on_field, WARNING, |
| "__weak attribute cannot be specified on a field declaration") |
| DIAG(warn_attribute_weak_on_local, WARNING, |
| "__weak attribute cannot be specified on an automatic variable") |
| DIAG(warn_attribute_weak_import_invalid_on_definition, WARNING, |
| "'weak_import' attribute cannot be specified on a definition") |
| DIAG(warn_attribute_wrong_decl_type, WARNING, |
| "'%0' attribute only applies to %select{function|union|" |
| "variable and function|function or method}1 types") |
| DIAG(warn_attribute_ignored_for_field_of_type, WARNING, |
| "%0 attribute ignored for field of type %1") |
| DIAG(warn_transparent_union_attribute_field_size, WARNING, |
| "transparent_union attribute ignored, size of type %0 must match type of first field") |
| DIAG(warn_transparent_union_attribute_not_difinition, WARNING, |
| "transparent_union attribute ignored, union type must be defined") |
| DIAG(warn_transparent_union_attribute_floating, WARNING, |
| "transparent_union attribute ignored, first field cannot be a floating-point or vector type") |
| DIAG(warn_transparent_union_attribute_zero_fields, WARNING, |
| "transparent_union attribute ignored, the union does not contain any fields") |
| DIAG(warn_transparent_union_attribute_not_c, WARNING, |
| "transparent_union attribute ignored, attribute is c only") |
| DIAG(warn_attribute_type_not_supported, WARNING, |
| "'%0' attribute argument not supported: %1") |
| DIAG(warn_attribute_unknown_visibility, WARNING, |
| "unknown visibility '%1'") |
| DIAG(err_unknown_machine_mode, ERROR, |
| "unknown machine mode %0") |
| DIAG(err_unsupported_machine_mode, ERROR, |
| "unsupported machine mode %0") |
| DIAG(err_mode_not_primitive, ERROR, |
| "mode attribute only supported for integer and floating-point types") |
| DIAG(err_mode_wrong_type, ERROR, |
| "type of machine mode does not match type of base type") |
| DIAG(err_attr_wrong_decl, ERROR, |
| "'%0' attribute invalid on this declaration, requires typedef or value") |
| DIAG(warn_attribute_nonnull_no_pointers, WARNING, |
| "'nonnull' attribute applied to function with no pointer arguments") |
| DIAG(warn_transparent_union_nonpointer, WARNING, |
| "'transparent_union' attribute support incomplete; only supported for " |
| "pointer unions") |
| DIAG(warn_attribute_sentinel_not_variadic, WARNING, |
| "'sentinel' attribute only supported for variadic functions") |
| DIAG(err_attribute_sentinel_less_than_zero, ERROR, |
| "'sentinel' parameter 1 less than zero") |
| DIAG(err_attribute_sentinel_not_zero_or_one, ERROR, |
| "'sentinel' parameter 2 not 0 or 1") |
| DIAG(err_attribute_cleanup_arg_not_found, ERROR, |
| "'cleanup' argument %0 not found") |
| DIAG(err_attribute_cleanup_arg_not_function, ERROR, |
| "'cleanup' argument %0 is not a function") |
| DIAG(err_attribute_cleanup_func_must_take_one_arg, ERROR, |
| "'cleanup' function %0 must take 1 parameter") |
| DIAG(err_attribute_cleanup_func_arg_incompatible_type, ERROR, |
| "'cleanup' function %0 parameter has type %1 which is incompatible with " |
| "type %2") |
| |
| // Clang-Specific Attributes |
| DIAG(err_attribute_iboutlet, ERROR, |
| "'iboutlet' attribute can only be applied to instance variables or properties") |
| DIAG(err_attribute_overloadable_not_function, ERROR, |
| "'overloadable' attribute can only be applied to a function") |
| DIAG(err_attribute_overloadable_missing, ERROR, |
| "%select{overloaded function|redeclaration of}0 %1 must have the 'overloadable' attribute") |
| DIAG(note_attribute_overloadable_prev_overload, NOTE, |
| "previous overload of function is here") |
| DIAG(err_attribute_overloadable_no_prototype, ERROR, |
| "'overloadable' function %0 must have a prototype") |
| |
| // Function Parameter Semantic Analysis. |
| DIAG(err_param_with_void_type, ERROR, |
| "argument may not have 'void' type") |
| DIAG(err_void_only_param, ERROR, |
| "'void' must be the first and only parameter if specified") |
| DIAG(err_void_param_qualified, ERROR, |
| "'void' as parameter must not have type qualifiers") |
| DIAG(err_ident_list_in_fn_declaration, ERROR, |
| "a parameter list without types is only allowed in a function definition") |
| DIAG(ext_param_not_declared, EXTENSION, |
| "parameter %0 was not declared, defaulting to type 'int'") |
| DIAG(ext_param_typedef_of_void, EXTENSION, |
| "empty parameter list defined with a typedef of 'void' not allowed in C++") |
| DIAG(err_param_default_argument, ERROR, |
| "C does not support default arguments") |
| DIAG(err_param_default_argument_redefinition, ERROR, |
| "redefinition of default argument") |
| DIAG(err_param_default_argument_missing, ERROR, |
| "missing default argument on parameter") |
| DIAG(err_param_default_argument_missing_name, ERROR, |
| "missing default argument on parameter %0") |
| DIAG(err_param_default_argument_references_param, ERROR, |
| "default argument references parameter %0") |
| DIAG(err_param_default_argument_references_local, ERROR, |
| "default argument references local variable %0 of enclosing function") |
| DIAG(err_param_default_argument_references_this, ERROR, |
| "default argument references 'this'") |
| DIAG(err_param_default_argument_nonfunc, ERROR, |
| "default arguments can only be specified for parameters in a function" |
| " declaration") |
| DIAG(ext_param_promoted_not_compatible_with_prototype, EXTWARN, |
| "promoted type %0 of K&R function parameter is not compatible with the " |
| "parameter type %1 declared in a previous prototype") |
| |
| // C++ Overloading Semantic Analysis. |
| DIAG(err_ovl_diff_return_type, ERROR, |
| "functions that differ only in their return type cannot be overloaded") |
| DIAG(err_ovl_static_nonstatic_member, ERROR, |
| "static and non-static member functions with the same parameter types " |
| "cannot be overloaded") |
| DIAG(err_ovl_no_viable_function_in_call, ERROR, |
| "no matching function for call to %0") |
| DIAG(err_ovl_no_viable_member_function_in_call, ERROR, |
| "no matching member function for call to %0") |
| DIAG(err_ovl_ambiguous_call, ERROR, |
| "call to %0 is ambiguous") |
| DIAG(err_ovl_deleted_call, ERROR, |
| "call to %select{unavailable|deleted}0 function %1") |
| DIAG(err_ovl_ambiguous_member_call, ERROR, |
| "call to member function %0 is ambiguous") |
| DIAG(err_ovl_deleted_member_call, ERROR, |
| "call to %select{unavailable|deleted}0 member function %1") |
| DIAG(err_ovl_candidate, NOTE, |
| "candidate function") |
| DIAG(err_ovl_candidate_deleted, NOTE, |
| "candidate function has been explicitly %select{made unavailable|deleted}0") |
| DIAG(err_ovl_builtin_candidate, NOTE, |
| "built-in candidate function %0") |
| DIAG(err_ovl_no_viable_function_in_init, ERROR, |
| "no matching constructor for initialization of %0") |
| DIAG(err_ovl_ambiguous_init, ERROR, |
| "call to constructor of %0 is ambiguous") |
| DIAG(err_ovl_deleted_init, ERROR, |
| "call to %select{unavailable|deleted}0 constructor of %1") |
| DIAG(err_ovl_ambiguous_oper, ERROR, |
| "use of overloaded operator '%0' is ambiguous") |
| DIAG(err_ovl_no_viable_oper, ERROR, |
| "no viable overloaded '%0'") |
| DIAG(err_ovl_deleted_oper, ERROR, |
| "overload resolution selected %select{unavailable|deleted}0 operator '%1'") |
| |
| DIAG(err_ovl_no_viable_object_call, ERROR, |
| "no matching function for call to object of type %0") |
| DIAG(err_ovl_ambiguous_object_call, ERROR, |
| "call to object of type %0 is ambiguous") |
| DIAG(err_ovl_deleted_object_call, ERROR, |
| "call to %select{unavailable|deleted}0 function call operator in type %1") |
| DIAG(err_ovl_surrogate_cand, NOTE, |
| "conversion candidate of type %0") |
| DIAG(err_member_call_without_object, ERROR, |
| "call to non-static member function without an object argument") |
| |
| // C++ Template Declarations |
| DIAG(err_template_param_shadow, ERROR, |
| "declaration of %0 shadows template parameter") |
| DIAG(note_template_param_here, NOTE, |
| "template parameter is declared here") |
| DIAG(note_template_export_unsupported, NOTE, |
| "exported templates are unsupported") |
| DIAG(err_template_outside_namespace_or_class_scope, ERROR, |
| "templates can only be declared in namespace or class scope") |
| DIAG(err_template_linkage, ERROR, |
| "templates must have C++ linkage") |
| DIAG(err_template_unnamed_class, ERROR, |
| "cannot declare a class template with no name") |
| DIAG(err_template_param_list_different_arity, ERROR, |
| "%select{too few|too many}0 template parameters in template %select{|template parameter }1redeclaration") |
| DIAG(note_template_param_list_different_arity, NOTE, |
| "%select{too few|too many}0 template parameters in template template argument") |
| DIAG(note_template_prev_declaration, NOTE, |
| "previous template %select{declaration|template parameter}0 is here") |
| DIAG(err_template_param_different_kind, ERROR, |
| "template parameter has a different kind in template %select{|template parameter }0redeclaration") |
| DIAG(note_template_param_different_kind, NOTE, |
| "template parameter has a different kind in template argument") |
| DIAG(err_template_nontype_parm_different_type, ERROR, |
| "template non-type parameter has a different type %0 in template " |
| "%select{|template parameter }1redeclaration") |
| DIAG(note_template_nontype_parm_different_type, NOTE, |
| "template non-type parameter has a different type %0 in template argument") |
| DIAG(note_template_nontype_parm_prev_declaration, NOTE, |
| "previous non-type template parameter with type %0 is here") |
| DIAG(err_template_nontype_parm_bad_type, ERROR, |
| "a non-type template parameter cannot have type %0") |
| DIAG(err_template_param_default_arg_redefinition, ERROR, |
| "template parameter redefines default argument") |
| DIAG(note_template_param_prev_default_arg, NOTE, |
| "previous default template argument defined here") |
| DIAG(err_template_param_default_arg_missing, ERROR, |
| "template parameter missing a default argument") |
| |
| // C++ Template Argument Lists |
| DIAG(err_template_arg_list_different_arity, ERROR, |
| "%select{too few|too many}0 template arguments for " |
| "%select{class template|function template|template template parameter" |
| "|template}1 %2") |
| DIAG(note_template_decl_here, NOTE, |
| "template is declared here") |
| DIAG(err_template_arg_must_be_type, ERROR, |
| "template argument for template type parameter must be a type") |
| DIAG(err_template_arg_must_be_expr, ERROR, |
| "template argument for non-type template parameter must be an expression") |
| DIAG(err_template_arg_nontype_ambig, ERROR, |
| "template argument for non-type template parameter is treated as type %0") |
| DIAG(err_template_arg_must_be_template, ERROR, |
| "template argument for template template parameter must be a template") |
| DIAG(err_template_arg_local_type, ERROR, |
| "template argument uses local type %0") |
| DIAG(err_template_arg_unnamed_type, ERROR, |
| "template argument uses unnamed type") |
| DIAG(note_template_unnamed_type_here, NOTE, |
| "unnamed type used in template argument was declared here") |
| DIAG(err_template_arg_not_class_template, ERROR, |
| "template argument does not refer to a class template") |
| DIAG(note_template_arg_refers_here_func, NOTE, |
| "template argument refers to function template %0, here") |
| DIAG(err_template_arg_template_params_mismatch, ERROR, |
| "template template argument has different template parameters than its " |
| "corresponding template template parameter") |
| DIAG(err_template_arg_not_integral_or_enumeral, ERROR, |
| "non-type template argument of type %0 must have an integral or enumeration" |
| " type") |
| DIAG(err_template_arg_not_ice, ERROR, |
| "non-type template argument of type %0 is not an integral constant expression") |
| DIAG(err_template_arg_not_convertible, ERROR, |
| "non-type template argument of type %0 cannot be converted to a value of type %1") |
| DIAG(err_template_arg_negative, ERROR, |
| "non-type template argument provides negative value '%0' for unsigned " |
| "template parameter of type %1") |
| DIAG(err_template_arg_too_large, ERROR, |
| "non-type template argument value '%0' is too large for template " |
| "parameter of type %1") |
| DIAG(err_template_arg_no_ref_bind, ERROR, |
| "non-type template parameter of reference type %0 cannot bind to template argument of type %1") |
| DIAG(err_template_arg_ref_bind_ignores_quals, ERROR, |
| "reference binding of non-type template parameter of type %0 to template argument of type %1 ignores qualifiers") |
| DIAG(err_template_arg_not_object_or_func_form, ERROR, |
| "non-type template argument does not directly refer to an object or function") |
| DIAG(err_template_arg_field, ERROR, |
| "non-type template argument refers to non-static data member %0") |
| DIAG(err_template_arg_method, ERROR, |
| "non-type template argument refers to non-static member function %0") |
| DIAG(err_template_arg_function_not_extern, ERROR, |
| "non-template argument refers to function %0 with internal linkage") |
| DIAG(err_template_arg_object_not_extern, ERROR, |
| "non-template argument refers to object %0 that does not have external linkage") |
| DIAG(note_template_arg_internal_object, NOTE, |
| "non-template argument refers to %select{function|object}0 here") |
| DIAG(note_template_arg_refers_here, NOTE, |
| "non-template argument refers here") |
| DIAG(err_template_arg_not_object_or_func, ERROR, |
| "non-type template argument does not refer to an object or function") |
| DIAG(err_template_arg_not_pointer_to_member_form, ERROR, |
| "non-type template argument is not a pointer to member constant") |
| DIAG(err_template_arg_extra_parens, ERROR, |
| "non-type template argument cannot be surrounded by parentheses") |
| |
| // C++ class template specialization |
| DIAG(err_template_spec_needs_header, ERROR, |
| "template specialization requires 'template<>'") |
| DIAG(err_template_spec_extra_headers, ERROR, |
| "template specialization must have a single 'template<>' header") |
| DIAG(unsup_template_partial_spec, ERROR, |
| "class template partial specialization is not yet supported") |
| DIAG(err_template_spec_decl_out_of_scope_global, ERROR, |
| "class template specialization of %0 must occur in the global scope") |
| DIAG(err_template_spec_decl_out_of_scope, ERROR, |
| "class template specialization of %0 not in namespace %1") |
| DIAG(err_template_spec_decl_function_scope, ERROR, |
| "class template specialization of %0 in function scope") |
| DIAG(err_template_spec_redecl_out_of_scope, ERROR, |
| "class template specialization of %0 not in a namespace enclosing %1") |
| DIAG(err_template_spec_redecl_global_scope, ERROR, |
| "class template specialization of %0 must occur in at global scope") |
| |
| // C++ Template Instantiation |
| DIAG(err_template_recursion_depth_exceeded, ERROR, |
| "recursive template instantiation exceeded maximum depth of %0") |
| DIAG(note_template_recursion_depth, NOTE, |
| "use -ftemplate-depth-N to increase recursive template " |
| "instantiation depth") |
| DIAG(err_template_implicit_instantiate_undefined, ERROR, |
| "implicit instantiation of undefined template %0") |
| DIAG(note_template_class_instantiation_here, NOTE, |
| "in instantiation of template class %0 requested here") |
| DIAG(note_default_arg_instantiation_here, NOTE, |
| "in instantiation of default argument for '%0' required here") |
| DIAG(err_field_instantiates_to_function, ERROR, |
| "data member instantiated with function type %0") |
| |
| DIAG(err_unexpected_typedef, ERROR, |
| "unexpected type name %0: expected expression") |
| DIAG(err_unexpected_namespace, ERROR, |
| "unexpected namespace name %0: expected expression") |
| DIAG(err_undeclared_var_use, ERROR, |
| "use of undeclared identifier %0") |
| DIAG(err_undeclared_use, ERROR, |
| "use of undeclared '%0'") |
| DIAG(warn_deprecated, WARNING, |
| "%0 is deprecated") |
| DIAG(warn_unavailable, WARNING, |
| "%0 is unavailable") |
| DIAG(note_unavailable_here, NOTE, |
| "function has been explicitly marked %select{unavailable|deleted}0 here") |
| DIAG(err_redefinition, ERROR, |
| "redefinition of %0") |
| DIAG(err_static_non_static, ERROR, |
| "static declaration of %0 follows non-static declaration") |
| DIAG(err_non_static_static, ERROR, |
| "non-static declaration of %0 follows static declaration") |
| DIAG(err_redefinition_different_type, ERROR, |
| "redefinition of %0 with a different type") |
| DIAG(err_redefinition_different_kind, ERROR, |
| "redefinition of %0 as different kind of symbol") |
| DIAG(err_redefinition_different_typedef, ERROR, |
| "typedef redefinition with different types (%0 vs %1)") |
| DIAG(err_tag_definition_of_typedef, ERROR, |
| "definition of type %0 conflicts with typedef of the same name") |
| DIAG(err_conflicting_types, ERROR, |
| "conflicting types for %0") |
| DIAG(err_nested_redefinition, ERROR, |
| "nested redefinition of %0") |
| DIAG(err_use_with_wrong_tag, ERROR, |
| "use of %0 with tag type that does not match previous declaration") |
| DIAG(ext_forward_ref_enum, EXTENSION, |
| "ISO C forbids forward references to 'enum' types") |
| DIAG(err_forward_ref_enum, ERROR, |
| "ISO C++ forbids forward references to 'enum' types") |
| DIAG(err_redefinition_of_enumerator, ERROR, |
| "redefinition of enumerator %0") |
| DIAG(err_duplicate_member, ERROR, |
| "duplicate member %0") |
| DIAG(ext_enum_value_not_int, EXTENSION, |
| "ISO C restricts enumerator values to range of 'int' (%0 is too large)") |
| DIAG(warn_enum_too_large, WARNING, |
| "enumeration values exceed range of largest integer") |
| DIAG(warn_illegal_constant_array_size, EXTENSION, |
| "size of static array must be an integer constant expression") |
| DIAG(err_vla_decl_in_file_scope, ERROR, |
| "variable length array declaration not allowed at file scope") |
| DIAG(err_vla_decl_has_static_storage, ERROR, |
| "variable length array declaration can not have 'static' storage duration") |
| DIAG(err_vla_decl_has_extern_linkage, ERROR, |
| "variable length array declaration can not have 'extern' linkage") |
| DIAG(err_vm_decl_in_file_scope, ERROR, |
| "variably modified type declaration not allowed at file scope") |
| DIAG(err_vm_decl_has_extern_linkage, ERROR, |
| "variably modified type declaration can not have 'extern' linkage") |
| DIAG(err_typecheck_field_variable_size, ERROR, |
| "fields must have a constant size: 'variable length array in structure'" |
| " extension will never be supported") |
| DIAG(err_typecheck_negative_array_size, ERROR, |
| "array size is negative") |
| DIAG(warn_typecheck_function_qualifiers, WARNING, |
| "qualifier on function type %0 has unspecified behavior") |
| DIAG(err_typecheck_invalid_restrict_not_pointer, ERROR, |
| "restrict requires a pointer or reference (%0 is invalid)") |
| DIAG(err_typecheck_invalid_restrict_invalid_pointee, ERROR, |
| "pointer to function type %0 may not be 'restrict' qualified") |
| DIAG(ext_typecheck_zero_array_size, EXTENSION, |
| "zero size arrays are an extension") |
| DIAG(err_at_least_one_initializer_needed_to_size_array, ERROR, |
| "at least one initializer value required to size array") |
| DIAG(err_array_size_non_int, ERROR, |
| "size of array has non-integer type %0") |
| DIAG(err_init_element_not_constant, ERROR, |
| "initializer element is not a compile-time constant") |
| DIAG(err_block_extern_cant_init, ERROR, |
| "'extern' variable cannot have an initializer") |
| DIAG(warn_extern_init, WARNING, |
| "'extern' variable has an initializer") |
| DIAG(err_variable_object_no_init, ERROR, |
| "variable-sized object may not be initialized") |
| DIAG(err_array_init_list_required, ERROR, |
| "initialization with '{...}' expected for array") |
| DIAG(err_excess_initializers, ERROR, |
| "excess elements in %select{array|vector|scalar|union|struct}0 initializer") |
| DIAG(warn_excess_initializers, WARNING, |
| "excess elements in %select{array|vector|scalar|union|struct}0 initializer") |
| DIAG(err_excess_initializers_in_char_array_initializer, ERROR, |
| "excess elements in char array initializer") |
| DIAG(warn_excess_initializers_in_char_array_initializer, WARNING, |
| "excess elements in char array initializer") |
| DIAG(warn_initializer_string_for_char_array_too_long, WARNING, |
| "initializer-string for char array is too long") |
| DIAG(warn_braces_around_scalar_init, WARNING, |
| "braces around scalar initializer") |
| DIAG(err_many_braces_around_scalar_init, ERROR, |
| "too many braces around scalar initializer") |
| DIAG(err_empty_scalar_initializer, ERROR, |
| "scalar initializer cannot be empty") |
| DIAG(err_illegal_initializer, ERROR, |
| "illegal initializer (only variables can be initialized)") |
| DIAG(err_illegal_initializer_type, ERROR, |
| "illegal initializer type %0") |
| DIAG(err_implicit_empty_initializer, ERROR, |
| "initializer for aggregate with no elements requires explicit braces") |
| DIAG(err_bitfield_has_negative_width, ERROR, |
| "bit-field %0 has negative width (%1)") |
| DIAG(err_bitfield_has_zero_width, ERROR, |
| "bit-field %0 has zero width") |
| DIAG(err_bitfield_width_exceeds_type_size, ERROR, |
| "size of bit-field %0 exceeds size of its type (%1 bits)") |
| |
| DIAG(err_redefinition_of_label, ERROR, |
| "redefinition of label '%0'") |
| DIAG(err_undeclared_label_use, ERROR, |
| "use of undeclared label '%0'") |
| |
| DIAG(err_goto_into_scope, ERROR, |
| "illegal jump (scoping violation)") |
| |
| DIAG(ext_implicit_function_decl, EXTENSION, |
| "implicit declaration of function %0 is invalid in C99") |
| |
| DIAG(err_func_returning_array_function, ERROR, |
| "function cannot return array or function type %0") |
| DIAG(err_field_declared_as_function, ERROR, |
| "field %0 declared as a function") |
| DIAG(err_field_incomplete, ERROR, |
| "field has incomplete type %0") |
| DIAG(ext_variable_sized_type_in_struct, EXTWARN, |
| "field of variable sized type %0 not at the end of a struct or class is a " |
| "GNU extension") |
| DIAG(err_flexible_array_empty_struct, ERROR, |
| "flexible array %0 not allowed in otherwise empty struct") |
| DIAG(ext_flexible_array_in_struct, EXTENSION, |
| "%0 may not be nested in a struct due to flexible array member") |
| DIAG(ext_flexible_array_in_array, EXTENSION, |
| "%0 may not be used as an array element due to flexible array member") |
| DIAG(err_flexible_array_init_nonempty, ERROR, |
| "non-empty initialization of flexible array member inside subobject") |
| DIAG(err_flexible_array_init_needs_braces, ERROR, |
| "flexible array requires brace-enclosed initializer") |
| DIAG(err_illegal_decl_array_of_functions, ERROR, |
| "'%0' declared as array of functions") |
| DIAG(err_illegal_decl_array_incomplete_type, ERROR, |
| "array has incomplete element type %0") |
| DIAG(err_illegal_decl_array_of_references, ERROR, |
| "'%0' declared as array of references") |
| DIAG(err_illegal_decl_pointer_to_reference, ERROR, |
| "'%0' declared as a pointer to a reference") |
| DIAG(err_illegal_decl_mempointer_to_void, ERROR, |
| "'%0' declared as a member pointer to void") |
| DIAG(err_illegal_decl_mempointer_in_nonclass, ERROR, |
| "'%0' does not point into a class") |
| DIAG(err_reference_to_void, ERROR, |
| "cannot form a reference to 'void'") |
| DIAG(err_qualified_block_pointer_type, ERROR, |
| "qualifier specification on block pointer type not allowed") |
| DIAG(err_nonfunction_block_type, ERROR, |
| "block pointer to non-function type is invalid") |
| DIAG(err_return_block_has_expr, ERROR, |
| "void block should not return a value") |
| DIAG(err_block_return_missing_expr, ERROR, |
| "non-void block should return a value") |
| DIAG(err_block_with_return_type_requires_args, ERROR, |
| "block with explicit return type requires argument list") |
| DIAG(err_func_def_incomplete_result, ERROR, |
| "result type for function definition cannot be incomplete") |
| |
| // Expressions. |
| DIAG(ext_sizeof_function_type, EXTENSION, |
| "invalid application of 'sizeof' to a function type") |
| DIAG(ext_sizeof_void_type, EXTENSION, |
| "invalid application of '%0' to a void type") |
| // FIXME: merge with %select |
| DIAG(err_sizeof_incomplete_type, ERROR, |
| "invalid application of 'sizeof' to an incomplete type %0") |
| DIAG(err_alignof_incomplete_type, ERROR, |
| "invalid application of '__alignof' to an incomplete type %0") |
| DIAG(err_sizeof_alignof_bitfield, ERROR, |
| "invalid application of '%select{sizeof|__alignof}0' to bitfield") |
| DIAG(err_offsetof_record_type, ERROR, |
| "offsetof requires struct, union, or class type, %0 invalid") |
| DIAG(err_offsetof_array_type, ERROR, |
| "offsetof requires array type, %0 invalid") |
| DIAG(ext_offsetof_extended_field_designator, EXTENSION, |
| "using extended field designator is an extension") |
| DIAG(warn_floatingpoint_eq, WARNING, |
| "comparing floating point with == or != is unsafe") |
| |
| DIAG(err_typecheck_subscript_value, ERROR, |
| "subscripted value is neither array nor pointer") |
| DIAG(err_typecheck_subscript, ERROR, |
| "array subscript is not an integer") |
| DIAG(err_typecheck_subscript_not_object, ERROR, |
| "illegal subscript of non-object type %0") |
| DIAG(err_typecheck_member_reference_struct_union, ERROR, |
| "member reference base type %0 is not a structure or union") |
| DIAG(err_typecheck_member_reference_ivar, ERROR, |
| "%0 does not have a member named %1") |
| DIAG(err_typecheck_member_reference_arrow, ERROR, |
| "member reference type %0 is not a pointer") |
| DIAG(err_typecheck_member_reference_type, ERROR, |
| "cannot refer to type member %0 with '%select{.|->}1'") |
| DIAG(err_typecheck_member_reference_unknown, ERROR, |
| "cannot refer to member %0 with '%select{.|->}1'") |
| DIAG(err_typecheck_incomplete_tag, ERROR, |
| "incomplete definition of type %0") |
| DIAG(err_typecheck_no_member, ERROR, |
| "no member named %0") |
| DIAG(err_member_redeclared, ERROR, |
| "class member cannot be redeclared") |
| DIAG(err_member_def_does_not_match, ERROR, |
| "out-of-line definition does not match any declaration in %0") |
| DIAG(err_nonstatic_member_out_of_line, ERROR, |
| "non-static data member defined out-of-line") |
| DIAG(err_qualified_typedef_declarator, ERROR, |
| "typedef declarator cannot be qualified") |
| DIAG(err_qualified_param_declarator, ERROR, |
| "parameter declarator cannot be qualified") |
| DIAG(err_out_of_line_declaration, ERROR, |
| "out-of-line declaration of a member must be a definition") |
| DIAG(note_member_def_close_match, NOTE, |
| "member declaration nearly matches") |
| DIAG(err_typecheck_ivar_variable_size, ERROR, |
| "instance variables must have a constant size") |
| // FIXME: Improve with %select |
| DIAG(err_typecheck_illegal_increment_decrement, ERROR, |
| "cannot modify value of type %0") |
| DIAG(err_typecheck_arithmetic_incomplete_type, ERROR, |
| "arithmetic on pointer to incomplete type %0") |
| DIAG(err_typecheck_pointer_arith_function_type, ERROR, |
| "arithmetic on pointer to function type %0") |
| DIAG(err_typecheck_pointer_arith_void_type, ERROR, |
| "arithmetic on pointer to void type") |
| DIAG(err_typecheck_decl_incomplete_type, ERROR, |
| "variable has incomplete type %0") |
| DIAG(err_tentative_def_incomplete_type, ERROR, |
| "tentative definition has type %0 that is never completed") |
| DIAG(err_tentative_def_incomplete_type_arr, ERROR, |
| "tentative definition has array of type %0 that is never completed") |
| |
| DIAG(err_realimag_invalid_type, ERROR, |
| "invalid type %0 to %1 operator") |
| DIAG(err_typecheck_sclass_fscope, ERROR, |
| "illegal storage class on file-scoped variable") |
| DIAG(err_typecheck_sclass_func, ERROR, |
| "illegal storage class on function") |
| DIAG(err_static_block_func, ERROR, |
| "function declared in block scope cannot have 'static' storage class") |
| DIAG(err_typecheck_address_of, ERROR, |
| "address of %0 requested") |
| DIAG(err_typecheck_invalid_lvalue_addrof, ERROR, |
| "address expression must be an lvalue or a function designator") |
| DIAG(err_typecheck_unary_expr, ERROR, |
| "invalid argument type %0 to unary expression") |
| DIAG(err_typecheck_indirection_requires_pointer, ERROR, |
| "indirection requires pointer operand (%0 invalid)") |
| DIAG(err_typecheck_invalid_operands, ERROR, |
| "invalid operands to binary expression (%0 and %1)") |
| DIAG(err_typecheck_sub_ptr_object, ERROR, |
| "subtraction of pointer %0 requires pointee to be a complete object type") |
| DIAG(err_typecheck_sub_ptr_compatible, ERROR, |
| "%0 and %1 are not pointers to compatible types") |
| DIAG(ext_typecheck_comparison_of_pointer_integer, WARNING, |
| "comparison between pointer and integer (%0 and %1)") |
| DIAG(ext_typecheck_comparison_of_distinct_pointers, WARNING, |
| "comparison of distinct pointer types (%0 and %1)") |
| DIAG(err_typecheck_assign_const, ERROR, |
| "read-only variable is not assignable") |
| DIAG(err_stmtexpr_file_scope, ERROR, |
| "statement expression not allowed at file scope") |
| |
| DIAG(err_invalid_this_use, ERROR, |
| "invalid use of 'this' outside of a nonstatic member function") |
| DIAG(err_invalid_member_use_in_static_method, ERROR, |
| "invalid use of member %0 in static member function") |
| DIAG(err_invalid_qualified_function_type, ERROR, |
| "type qualifier is not allowed on this function") |
| DIAG(err_invalid_qualified_typedef_function_type_use, ERROR, |
| "a qualified function type cannot be used to declare a nonmember function " |
| "or a static member function") |
| DIAG(err_invalid_non_static_member_use, ERROR, |
| "invalid use of nonstatic data member %0") |
| DIAG(err_invalid_incomplete_type_use, ERROR, |
| "invalid use of incomplete type %0") |
| DIAG(err_builtin_func_cast_more_than_one_arg, ERROR, |
| "function-style cast to a builtin type can only take one argument") |
| DIAG(err_builtin_direct_init_more_than_one_arg, ERROR, |
| "initializer of a builtin type can only take one argument") |
| DIAG(err_value_init_for_array_type, ERROR, |
| "array types cannot be value-initialized") |
| DIAG(warn_printf_not_string_constant, WARNING, |
| "format string is not a string literal (potentially insecure)") |
| |
| DIAG(err_unexpected_interface, ERROR, |
| "unexpected interface name %0: expected expression") |
| DIAG(err_property_not_found, ERROR, |
| "property %0 not found on object of type %1") |
| DIAG(ext_gnu_void_ptr, EXTENSION, |
| "use of GNU void* extension") |
| DIAG(ext_gnu_ptr_func_arith, EXTENSION, |
| "arithmetic on pointer to function type %0 is a GNU extension") |
| DIAG(error_readonly_property_assignment, ERROR, |
| "assigning to property with 'readonly' attribute not allowed") |
| DIAG(ext_integer_increment_complex, EXTENSION, |
| "ISO C does not support '++'/'--' on complex integer type %0") |
| DIAG(ext_integer_complement_complex, EXTENSION, |
| "ISO C does not support '~' for complex conjugation of %0") |
| DIAG(error_nosetter_property_assignment, ERROR, |
| "setter method is needed to assign to object using property" |
| " assignment syntax") |
| DIAG(ext_freestanding_complex, EXTENSION, |
| "complex numbers are an extension in a freestanding C99 implementation") |
| |
| |
| // Obj-c expressions |
| DIAG(warn_class_method_not_found, WARNING, |
| "method %objcclass0 not found (return type defaults to 'id')") |
| DIAG(warn_inst_method_not_found, WARNING, |
| "method %objcinstance0 not found (return type defaults to 'id')") |
| DIAG(error_no_super_class_message, ERROR, |
| "no @interface declaration found in class messaging of %0") |
| DIAG(error_no_super_class, ERROR, |
| "no super class declared in @interface for %0") |
| DIAG(err_invalid_receiver_to_message, ERROR, |
| "invalid receiver to message expression") |
| DIAG(warn_bad_receiver_type, WARNING, |
| "receiver type %0 is not 'id' or Objective-C interface pointer, consider casting it to 'id'") |
| DIAG(err_bad_receiver_type, ERROR, |
| "bad receiver type %0") |
| DIAG(error_objc_throw_expects_object, ERROR, |
| "invalid %0 argument (expected an ObjC object type)") |
| DIAG(error_rethrow_used_outside_catch, ERROR, |
| "@throw (rethrow) used outside of a @catch block") |
| DIAG(err_attribute_multiple_objc_gc, ERROR, |
| "multiple garbage collection attributes specified for type") |
| DIAG(err_catch_param_not_objc_type, ERROR, |
| "@catch parameter is not an Objective-C class type") |
| DIAG(err_illegal_qualifiers_on_catch_parm, ERROR, |
| "illegal qualifiers on @catch parameter") |
| DIAG(err_illegal_super_cast, ERROR, |
| "cannot cast 'super' (it isn't an expression)") |
| |
| |
| // C++ casts |
| DIAG(err_bad_cxx_cast_generic, ERROR, |
| "%0 from %2 to %1 is not allowed") |
| DIAG(err_bad_cxx_cast_rvalue, ERROR, |
| "%0 from rvalue to reference type %1") |
| DIAG(err_bad_cxx_cast_const_away, ERROR, |
| "%0 from %2 to %1 casts away constness") |
| DIAG(err_bad_const_cast_dest, ERROR, |
| "const_cast to %0, which is not a reference, pointer-to-object, " |
| "or pointer-to-data-member") |
| DIAG(err_bad_reinterpret_cast_same_type, ERROR, |
| "source and destination type of reinterpret_cast are not distinct") |
| DIAG(ext_reinterpret_cast_fn_obj, EXTENSION, |
| "reinterpret_cast between pointer-to-function and pointer-to-object is " |
| "an extension") |
| DIAG(err_bad_reinterpret_cast_small_int, ERROR, |
| "cast from pointer to smaller type %0 loses information") |
| DIAG(err_bad_dynamic_cast_not_ref_or_ptr, ERROR, |
| "%0 is not a reference or pointer") |
| DIAG(err_bad_dynamic_cast_not_class, ERROR, |
| "%0 is not a class") |
| DIAG(err_bad_dynamic_cast_incomplete, ERROR, |
| "%0 is an incomplete type") |
| DIAG(err_bad_dynamic_cast_not_ptr, ERROR, |
| "%0 is not a pointer") |
| DIAG(err_bad_dynamic_cast_not_polymorphic, ERROR, |
| "%0 is not polymorphic") |
| // FIXME: Display the path somehow better. |
| DIAG(err_ambiguous_base_to_derived_cast, ERROR, |
| "ambiguous static_cast from base %0 to derived %1:%2") |
| DIAG(err_static_downcast_via_virtual, ERROR, |
| "cannot cast %0 to %1 via virtual base %2") |
| |
| // Other C++ expressions |
| DIAG(err_need_header_before_typeid, ERROR, |
| "you need to include <typeinfo> before using the 'typeid' operator") |
| DIAG(err_static_illegal_in_new, ERROR, |
| "the 'static' modifier for the array size is not legal in new expressions") |
| DIAG(err_array_new_needs_size, ERROR, |
| "array size must be specified in new expressions") |
| DIAG(err_bad_new_type, ERROR, |
| "cannot allocate %select{function|incomplete|reference}1 type %0 with new") |
| DIAG(err_new_array_nonconst, ERROR, |
| "only the first dimension of an allocated array may be non-const") |
| DIAG(err_array_size_not_integral, ERROR, |
| "array size expression must have integral or enumerated type, not %0") |
| DIAG(err_new_uninitialized_const, ERROR, |
| "must provide an initializer if the allocated object is 'const'") |
| DIAG(err_delete_operand, ERROR, |
| "cannot delete expression of type %0") |
| DIAG(warn_delete_incomplete, WARNING, |
| "deleting pointer to incomplete type %0 may cause undefined behaviour") |
| DIAG(err_decrement_bool, ERROR, |
| "cannot decrement expression of type bool") |
| DIAG(warn_increment_bool, WARNING, |
| "incrementing expression of type bool is deprecated") |
| DIAG(err_catch_incomplete_ptr, ERROR, |
| "cannot catch pointer to incomplete type %0") |
| DIAG(err_catch_incomplete_ref, ERROR, |
| "cannot catch reference to incomplete type %0") |
| DIAG(err_catch_incomplete, ERROR, |
| "cannot catch incomplete type %0") |
| DIAG(err_qualified_catch_declarator, ERROR, |
| "exception declarator cannot be qualified") |
| DIAG(err_early_catch_all, ERROR, |
| "catch-all handler must come last") |
| DIAG(err_bad_memptr_rhs, ERROR, |
| "right hand operand to %0 must be a pointer to member of a complete class " |
| "but is %1") |
| DIAG(err_bad_memptr_lhs, ERROR, |
| "left hand operand to %0 must be a %select{|pointer to }1class " |
| "compatible with the right hand operand, but is %2") |
| |
| DIAG(err_invalid_use_of_function_type, ERROR, |
| "a function type is not allowed here") |
| DIAG(err_invalid_use_of_array_type, ERROR, |
| "an array type is not allowed here") |
| DIAG(err_type_defined_in_condition, ERROR, |
| "types may not be defined in conditions") |
| DIAG(err_typecheck_bool_condition, ERROR, |
| "value of type %0 is not contextually convertible to 'bool'") |
| DIAG(err_expected_class_or_namespace, ERROR, |
| "expected a class or namespace") |
| DIAG(err_invalid_declarator_scope, ERROR, |
| "definition or redeclaration of %0 not in a namespace enclosing %1") |
| DIAG(err_invalid_declarator_global_scope, ERROR, |
| "definition or redeclaration of %0 cannot name the global scope") |
| DIAG(err_invalid_declarator_in_function, ERROR, |
| "definition or redeclaration of %0 not allowed inside a function") |
| DIAG(err_not_tag_in_scope, ERROR, |
| "%0 does not name a tag member in the specified scope") |
| |
| DIAG(warn_value_always_zero, WARNING, |
| "%0 is always zero in this context") |
| DIAG(warn_value_always_false, WARNING, |
| "%0 is always false in this context") |
| |
| // assignment related diagnostics (also for argument passing, returning, etc). |
| // FIXME: %2 is an english string here. |
| DIAG(err_typecheck_convert_incompatible, ERROR, |
| "incompatible type %2 %1, expected %0") |
| DIAG(err_cannot_initialize_decl_noname, ERROR, |
| "cannot initialize a value of type %0 with an %select{rvalue|lvalue}1 of type %2") |
| DIAG(err_cannot_initialize_decl, ERROR, |
| "cannot initialize %0 with an %select{rvalue|lvalue}1 of type %2") |
| DIAG(warn_incompatible_qualified_id, WARNING, |
| "incompatible type %2 %1, expected %0") |
| DIAG(warn_incompatible_qualified_id_operands, WARNING, |
| "invalid operands to binary expression (%0 and %1)") |
| DIAG(ext_typecheck_convert_pointer_int, EXTWARN, |
| "incompatible pointer to integer conversion %2 %1, expected %0") |
| DIAG(ext_typecheck_convert_int_pointer, EXTWARN, |
| "incompatible integer to pointer conversion %2 %1, expected %0") |
| DIAG(ext_typecheck_convert_pointer_void_func, EXTENSION, |
| "%2 %1 converts between void* and function pointer, expected %0") |
| DIAG(ext_typecheck_convert_incompatible_pointer, EXTWARN, |
| "incompatible pointer types %2 %1, expected %0") |
| DIAG(ext_typecheck_convert_discards_qualifiers, EXTWARN, |
| "%2 %1 discards qualifiers, expected %0") |
| DIAG(warn_incompatible_vectors, WARNING, |
| "incompatible vector types %2 %1, expected %0") |
| DIAG(err_int_to_block_pointer, ERROR, |
| "invalid conversion %2 integer %1, expected block pointer %0") |
| DIAG(err_typecheck_comparison_of_distinct_blocks, ERROR, |
| "comparison of distinct block types (%0 and %1)") |
| DIAG(ext_typecheck_convert_incompatible_block_pointer, EXTWARN, |
| "incompatible block pointer types %2 %1, expected %0") |
| |
| DIAG(err_typecheck_array_not_modifiable_lvalue, ERROR, |
| "array type %0 is not assignable") |
| DIAG(err_typecheck_non_object_not_modifiable_lvalue, ERROR, |
| "non-object type %0 is not assignable") |
| DIAG(err_typecheck_expression_not_modifiable_lvalue, ERROR, |
| "expression is not assignable") |
| DIAG(err_typecheck_incomplete_type_not_modifiable_lvalue, ERROR, |
| "incomplete type %0 is not assignable") |
| DIAG(err_typecheck_lvalue_casts_not_supported, ERROR, |
| "assignment to cast is illegal, lvalue casts are not supported") |
| |
| DIAG(err_typecheck_duplicate_vector_components_not_mlvalue, ERROR, |
| "vector is not assignable (contains duplicate components)") |
| DIAG(err_block_decl_ref_not_modifiable_lvalue, ERROR, |
| "variable is not assignable (missing __block type specifier)") |
| DIAG(err_typecheck_call_not_function, ERROR, |
| "called object type %0 is not a function or function pointer") |
| DIAG(err_typecheck_call_too_few_args, ERROR, |
| "too few arguments to %select{function|block|method}0 call") |
| DIAG(err_typecheck_call_too_many_args, ERROR, |
| "too many arguments to %select{function|block|method}0 call") |
| DIAG(err_deleted_function_use, ERROR, |
| "attempt to use a deleted function") |
| DIAG(warn_cannot_pass_non_pod_arg_to_vararg, WARNING, |
| "cannot pass object of non-POD type %0 through variadic " |
| "%select{function|block|method}1; call will abort at runtime") |
| DIAG(err_typecheck_closure_too_many_args, ERROR, |
| "too many arguments to closure call") |
| DIAG(err_typecheck_call_invalid_ordered_compare, ERROR, |
| "ordered compare requires two args of floating point type (%0 and %1)") |
| DIAG(err_typecheck_cond_expect_scalar, ERROR, |
| "used type %0 where arithmetic or pointer type is required") |
| DIAG(ext_typecheck_cond_one_void, EXTENSION, |
| "C99 forbids conditional expressions with only one void side") |
| DIAG(ext_typecheck_cast_nonscalar, EXTENSION, |
| "C99 forbids casting nonscalar type %0 to the same type") |
| DIAG(ext_typecheck_cast_to_union, EXTENSION, |
| "C99 forbids casts to union type") |
| DIAG(err_typecheck_cast_to_union_no_type, ERROR, |
| "cast to union type from type %0 not present in union") |
| DIAG(err_typecheck_expect_scalar_operand, ERROR, |
| "operand of type %0 where arithmetic or pointer type is required") |
| DIAG(err_typecheck_cond_incompatible_operands, ERROR, |
| "incompatible operand types (%0 and %1)") |
| DIAG(warn_typecheck_cond_incompatible_pointers, WARNING, |
| "pointer type mismatch (%0 and %1)") |
| DIAG(err_typecheck_choose_expr_requires_constant, ERROR, |
| "'__builtin_choose_expr' requires a constant expression") |
| DIAG(ext_typecheck_expression_not_constant_but_accepted, EXTENSION, |
| "expression is not a constant, but is accepted as one by GNU extensions") |
| DIAG(warn_unused_expr, WARNING, |
| "expression result unused") |
| |
| // inline asm. |
| DIAG(err_asm_wide_character, ERROR, |
| "wide string is invalid in 'asm'") |
| DIAG(err_asm_invalid_lvalue_in_output, ERROR, |
| "invalid lvalue in asm output") |
| DIAG(err_asm_invalid_output_constraint, ERROR, |
| "invalid output constraint '%0' in asm") |
| DIAG(err_asm_invalid_lvalue_in_input, ERROR, |
| "invalid lvalue in asm input for constraint '%0'") |
| DIAG(err_asm_invalid_input_constraint, ERROR, |
| "invalid input constraint '%0' in asm") |
| DIAG(err_asm_invalid_type_in_input, ERROR, |
| "invalid type %0 in asm input for constraint '%1'") |
| DIAG(err_asm_unknown_register_name, ERROR, |
| "unknown register name '%0' in asm") |
| DIAG(err_invalid_asm_cast_lvalue, ERROR, |
| "invalid use of a cast in a inline asm context requiring an l-value:" |
| " remove the cast or build with -fheinous-gnu-extensions") |
| DIAG(warn_invalid_asm_cast_lvalue, WARNING, |
| "invalid use of a cast in a inline asm context requiring an l-value:" |
| " accepted due to -fheinous-gnu-extensions, but clang may remove support" |
| " for this in the future") |
| |
| DIAG(err_invalid_conversion_between_vectors, ERROR, |
| "invalid conversion between vector type %0 and %1 of different size") |
| DIAG(err_invalid_conversion_between_vector_and_integer, ERROR, |
| "invalid conversion between vector type %0 and integer type %1 " |
| "of different size") |
| DIAG(err_invalid_conversion_between_vector_and_scalar, ERROR, |
| "invalid conversion between vector type %0 and scalar type %1") |
| DIAG(err_overload_expr_requires_non_zero_constant, ERROR, |
| "overload requires a non-zero constant expression as first argument") |
| DIAG(err_overload_incorrect_fntype, ERROR, |
| "argument is not a function, or has wrong number of parameters") |
| |
| // FIXME: PASSING TYPES AS STRING. |
| DIAG(err_overload_no_match, ERROR, |
| "no matching overload found for arguments of type '%0'") |
| DIAG(err_overload_multiple_match, ERROR, |
| "more than one matching function found in __builtin_overload") |
| |
| // C++ member initializers. |
| DIAG(err_mem_init_not_member_or_class, ERROR, |
| "member initializer %0 does not name a non-static data member or base " |
| "class") |
| DIAG(err_base_init_does_not_name_class, ERROR, |
| "constructor initializer %0 does not name a class") |
| DIAG(err_base_init_direct_and_virtual, ERROR, |
| "base class initializer %0 names both a direct base class and an" |
| " inherited virtual base class") |
| DIAG(err_in_class_initializer_non_integral_type, ERROR, |
| "in-class initializer has non-integral, non-enumeration type %0") |
| DIAG(err_in_class_initializer_non_constant, ERROR, |
| "in-class initializer is not an integral constant expression") |
| |
| // C++ anonymous unions and GNU anonymous structs/unions |
| DIAG(ext_anonymous_union, EXTENSION, |
| "anonymous unions are a GNU extension in C") |
| DIAG(ext_anonymous_struct, EXTENSION, |
| "anonymous structs are a GNU extension") |
| DIAG(err_anonymous_union_not_static, ERROR, |
| "anonymous unions at namespace or global scope must be declared 'static'") |
| DIAG(err_anonymous_union_with_storage_spec, ERROR, |
| "anonymous union at class scope must not have a storage specifier") |
| DIAG(err_anonymous_struct_not_member, ERROR, |
| "anonymous %select{structs|structs and classes}0 must be %select{struct or union|class}0 members") |
| DIAG(err_anonymous_union_member_redecl, ERROR, |
| "member of anonymous union redeclares %0") |
| DIAG(err_anonymous_struct_member_redecl, ERROR, |
| "member of anonymous struct redeclares %0") |
| DIAG(err_anonymous_record_with_type, ERROR, |
| "types cannot be declared in an anonymous %select{struct|union}0") |
| DIAG(err_anonymous_record_with_function, ERROR, |
| "functions cannot be declared in an anonymous %select{struct|union}0") |
| DIAG(err_anonymous_record_with_static, ERROR, |
| "static members cannot be declared in an anonymous %select{struct|union}0") |
| DIAG(err_anonymous_record_bad_member, ERROR, |
| "anonymous %select{struct|union}0 can only contain non-static data members") |
| DIAG(err_anonymous_record_nonpublic_member, ERROR, |
| "anonymous %select{struct|union}0 cannot contain a %select{private|protected}1 data member") |
| |
| // C++ derived classes |
| DIAG(err_base_clause_on_union, ERROR, |
| "unions cannot have base classes") |
| DIAG(err_base_must_be_class, ERROR, |
| "base specifier must name a class") |
| DIAG(err_union_as_base_class, ERROR, |
| "unions cannot be base classes") |
| DIAG(err_incomplete_base_class, ERROR, |
| "base class has incomplete type") |
| DIAG(err_duplicate_base_class, ERROR, |
| "base class %0 specified more than once as a direct base class") |
| // FIXME: better way to display derivation? Pass entire thing into diagclient? |
| DIAG(err_ambiguous_derived_to_base_conv, ERROR, |
| "ambiguous conversion from derived class %0 to base class %1:%2") |
| DIAG(err_ambiguous_memptr_conv, ERROR, |
| "ambiguous conversion from pointer to member of %select{base|derived}0 " |
| "class %1 to pointer to member of %select{derived|base}0 class %2:%3") |
| DIAG(err_memptr_conv_via_virtual, ERROR, |
| "conversion from pointer to member of class %0 to pointer to member " |
| "of class %1 via virtual base %2 is not allowed") |
| |
| // C++ member name lookup |
| DIAG(err_ambiguous_member_multiple_subobjects, ERROR, |
| "non-static member %0 found in multiple base-class subobjects of type %1:%2") |
| DIAG(err_ambiguous_member_multiple_subobject_types, ERROR, |
| "member %0 found in multiple base classes of different types") |
| DIAG(note_ambiguous_member_found, NOTE, |
| "member found by ambiguous name lookup") |
| DIAG(err_ambiguous_reference, ERROR, |
| "reference to %0 is ambiguous") |
| DIAG(note_ambiguous_candidate, NOTE, |
| "candidate found by name lookup is %q0") |
| |
| // C++ operator overloading |
| DIAG(err_operator_overload_needs_class_or_enum, ERROR, |
| "overloaded %0 must have at least one parameter of class " |
| "or enumeration type") |
| DIAG(err_operator_overload_variadic, ERROR, |
| "overloaded %0 cannot be variadic") |
| DIAG(err_operator_overload_static, ERROR, |
| "overloaded %0 cannot be a static member function") |
| DIAG(err_operator_overload_default_arg, ERROR, |
| "parameter of overloaded %0 cannot have a default argument") |
| DIAG(err_operator_overload_must_be, ERROR, |
| "overloaded %0 must be a %select{unary|binary|unary or binary}2 operator" |
| " (has %1 parameter%s1)") |
| DIAG(err_operator_overload_must_be_member, ERROR, |
| "overloaded %0 must be a non-static member function") |
| DIAG(err_operator_overload_post_incdec_must_be_int, ERROR, |
| "parameter of overloaded post-%select{increment|decrement}1 operator must" |
| " have type 'int' (not %0)") |
| |
| // C++ conversion functions |
| DIAG(err_conv_function_not_member, ERROR, |
| "conversion function must be a non-static member function") |
| DIAG(err_conv_function_return_type, ERROR, |
| "conversion function cannot have a return type") |
| DIAG(err_conv_function_with_params, ERROR, |
| "conversion function cannot have any parameters") |
| DIAG(err_conv_function_variadic, ERROR, |
| "conversion function cannot be variadic") |
| DIAG(err_conv_function_to_array, ERROR, |
| "conversion function cannot convert to an array type") |
| DIAG(err_conv_function_to_function, ERROR, |
| "conversion function cannot convert to a function type") |
| DIAG(err_conv_function_redeclared, ERROR, |
| "conversion function cannot be redeclared") |
| DIAG(warn_conv_to_self_not_used, WARNING, |
| "conversion function converting %0 to itself will never be used") |
| DIAG(warn_conv_to_base_not_used, WARNING, |
| "conversion function converting %0 to its base class %1 will never be used") |
| DIAG(warn_conv_to_void_not_used, WARNING, |
| "conversion function converting %0 to %1 will never be used") |
| |
| DIAG(warn_not_compound_assign, WARNING, |
| "use of unary operator that may be intended as compound assignment (%0=)") |
| |
| // C++0x explicit conversion operators |
| DIAG(warn_explicit_conversion_functions, WARNING, |
| "explicit conversion functions are a C++0x extension") |
| |
| DIAG(warn_printf_write_back, WARNING, |
| "use of '%%n' in format string discouraged (potentially insecure)") |
| DIAG(warn_printf_insufficient_data_args, WARNING, |
| "more '%%' conversions than data arguments") |
| DIAG(warn_printf_too_many_data_args, WARNING, |
| "more data arguments than '%%' conversions") |
| DIAG(warn_printf_invalid_conversion, WARNING, |
| "invalid conversion '%0'") |
| DIAG(warn_printf_missing_format_string, WARNING, |
| "format string missing") |
| DIAG(warn_printf_empty_format_string, WARNING, |
| "format string is empty") |
| DIAG(warn_printf_format_string_is_wide_literal, WARNING, |
| "format string should not be a wide string") |
| DIAG(warn_printf_format_string_contains_null_char, WARNING, |
| "format string contains '\\0' within the string body") |
| DIAG(warn_printf_asterisk_width_missing_arg, WARNING, |
| "'*' specified field width is missing a matching 'int' argument") |
| DIAG(warn_printf_asterisk_precision_missing_arg, WARNING, |
| "'.*' specified field precision is missing a matching 'int' argument") |
| DIAG(warn_printf_asterisk_width_wrong_type, WARNING, |
| "field width should have type 'int', but argument has type %0") |
| DIAG(warn_printf_asterisk_precision_wrong_type, WARNING, |
| "field precision should have type 'int', but argument has type %0") |
| |
| // CHECK: returning address/reference of stack memory |
| DIAG(warn_ret_stack_addr, WARNING, |
| "address of stack memory associated with local variable %0 returned") |
| DIAG(warn_ret_stack_ref, WARNING, |
| "reference to stack memory associated with local variable %0 returned") |
| |
| |
| // for non-floating point, expressions of the form x == x or x != x |
| // should result in a warning, since these always evaluate to a constant. |
| DIAG(warn_selfcomparison, WARNING, |
| "self-comparison always results in a constant value") |
| DIAG(warn_stringcompare, WARNING, |
| "result of comparison against a string literal is unspecified" |
| " (use strcmp?)") |
| |
| |
| // Blocks |
| DIAG(err_expected_block_lbrace, ERROR, |
| "expected '{' in block literal") |
| DIAG(err_goto_in_block, ERROR, |
| "goto not allowed in block literal") |
| DIAG(err_return_in_block_expression, ERROR, |
| "return not allowed in block expression literal") |
| |
| DIAG(err_ret_local_block, ERROR, |
| "returning block that lives on the local stack") |
| |
| // CFString checking |
| DIAG(err_cfstring_literal_not_string_constant, ERROR, |
| "CFString literal is not a string constant") |
| DIAG(warn_cfstring_literal_contains_non_ascii_character, WARNING, |
| "CFString literal contains non-ASCII character") |
| DIAG(warn_cfstring_literal_contains_nul_character, WARNING, |
| "CFString literal contains NUL character") |
| |
| // Statements. |
| DIAG(err_continue_not_in_loop, ERROR, |
| "'continue' statement not in loop statement") |
| DIAG(err_break_not_in_loop_or_switch, ERROR, |
| "'break' statement not in loop or switch statement") |
| DIAG(err_default_not_in_switch, ERROR, |
| "'default' statement not in switch statement") |
| DIAG(err_case_not_in_switch, ERROR, |
| "'case' statement not in switch statement") |
| DIAG(warn_case_value_overflow, WARNING, |
| "overflow converting case value to switch condition type (%0 to %1)") |
| DIAG(err_duplicate_case, ERROR, |
| "duplicate case value '%0'") |
| DIAG(warn_case_empty_range, WARNING, |
| "empty case range specified") |
| DIAG(err_typecheck_statement_requires_scalar, ERROR, |
| "statement requires expression of scalar type (%0 invalid)") |
| DIAG(err_typecheck_statement_requires_integer, ERROR, |
| "statement requires expression of integer type (%0 invalid)") |
| DIAG(err_multiple_default_labels_defined, ERROR, |
| "multiple default labels in one switch") |
| DIAG(warn_empty_if_body, WARNING, |
| "if statement has empty body") |
| DIAG(err_va_start_used_in_non_variadic_function, ERROR, |
| "'va_start' used in function with fixed args") |
| DIAG(warn_second_parameter_of_va_start_not_last_named_argument, WARNING, |
| "second parameter of 'va_start' not last named argument") |
| DIAG(err_first_argument_to_va_arg_not_of_type_va_list, ERROR, |
| "first argument to 'va_arg' is of type %0 and not 'va_list'") |
| |
| DIAG(warn_return_missing_expr, WARNING, |
| "non-void %select{function|method}1 %0 should return a value") |
| DIAG(ext_return_missing_expr, EXTENSION, |
| "non-void %select{function|method}1 %0 should return a value") |
| DIAG(ext_return_has_expr, EXTWARN, |
| "void %select{function|method}1 %0 should not return a value") |
| DIAG(ext_return_has_void_expr, EXTENSION, |
| "void %select{function|method}1 %0 should not return void expression") |
| |
| DIAG(err_shufflevector_non_vector, ERROR, |
| "first two arguments to __builtin_shufflevector must be vectors") |
| DIAG(err_shufflevector_incompatible_vector, ERROR, |
| "first two arguments to __builtin_shufflevector must have the same type") |
| DIAG(err_shufflevector_nonconstant_argument, ERROR, |
| "index for __builtin_shufflevector must be a constant integer") |
| DIAG(err_shufflevector_argument_too_large, ERROR, |
| "index for __builtin_shufflevector must be less than the total number" |
| " of vector elements") |
| |
| DIAG(err_stack_const_level, ERROR, |
| "level argument for a stack address builtin must be constant") |
| |
| DIAG(err_prefetch_invalid_argument, ERROR, |
| "argument to __builtin_prefetch must be a constant integer") |
| DIAG(err_argument_invalid_range, ERROR, |
| "argument should be a value from %0 to %1") |
| |
| DIAG(err_object_size_invalid_argument, ERROR, |
| "argument to __builtin_object_size must be a constant integer") |
| |
| DIAG(ext_mixed_decls_code, EXTENSION, |
| "ISO C90 forbids mixing declarations and code") |
| DIAG(err_non_variable_decl_in_for, ERROR, |
| "declaration of non-local variable in 'for' loop") |
| DIAG(err_toomany_element_decls, ERROR, |
| "only one element declaration is allowed") |
| DIAG(err_selector_element_not_lvalue, ERROR, |
| "selector element is not a valid lvalue") |
| DIAG(err_selector_element_type, ERROR, |
| "selector element type %0 is not a valid object") |
| DIAG(err_collection_expr_type, ERROR, |
| "collection expression type %0 is not a valid object") |
| |
| // Type |
| DIAG(ext_invalid_sign_spec, EXTENSION, |
| "'%0' cannot be signed or unsigned") |
| DIAG(warn_missing_declspec, WARNING, |
| "declaration specifier missing, defaulting to 'int'") |
| DIAG(warn_missing_type_specifier, WARNING, |
| "type specifier missing, defaults to 'int'") |
| DIAG(err_missing_type_specifier, ERROR, |
| "C++ requires a type specifier for all declarations") |
| DIAG(err_missing_param_declspec, ERROR, |
| "parameter requires a declaration specifier") |
| DIAG(warn_objc_array_of_interfaces, WARNING, |
| "array of interface %0 should probably be an array of pointers") |
| DIAG(ext_c99_array_usage, EXTENSION, |
| "use of C99-specific array features, accepted as an extension") |
| DIAG(err_invalid_protocol_qualifiers, ERROR, |
| "invalid protocol qualifiers on non-ObjC type") |
| DIAG(err_qualified_class_unsupported, ERROR, |
| "protocol qualified 'Class' is unsupported") |
| DIAG(warn_ivar_use_hidden, WARNING, |
| "local declaration of %0 hides instance variable") |
| DIAG(error_ivar_use_in_class_method, ERROR, |
| "instance variable %0 accessed in class method") |
| DIAG(error_private_ivar_access, ERROR, |
| "instance variable %0 is private") |
| DIAG(error_protected_ivar_access, ERROR, |
| "instance variable %0 is protected") |
| DIAG(warn_maynot_respond, WARNING, |
| "%0 may not respond to %1") |