def err_attribute_size_too_large : Error<"vector size too large">;
def err_typecheck_vector_not_convertable : Error<
"can't convert between vector values of different size (%0 and %1)">;
-def err_typecheck_ext_vector_not_typedef : Error<
- "ext_vector_type only applies to types, not variables">;
def err_ext_vector_component_exceeds_length : Error<
"vector component access exceeds type %0">;
def err_ext_vector_component_name_illegal : Error<
"variables, functions and tag types|thread-local variables|"
"variables and fields|variables, data members and tag types|"
"types and namespaces|Objective-C interfaces|methods and properties|"
- "struct or union|struct, union or class}1">,
+ "struct or union|struct, union or class|types}1">,
InGroup<IgnoredAttributes>;
def err_attribute_wrong_decl_type : Error<
"%0 attribute only applies to %select{functions|unions|"
"variables, functions and tag types|thread-local variables|"
"variables and fields|variables, data members and tag types|"
"types and namespaces|Objective-C interfaces|methods and properties|"
- "struct or union|struct, union or class}1">;
+ "struct or union|struct, union or class|types}1">;
def warn_type_attribute_wrong_type : Warning<
"'%0' only applies to %select{function|pointer|"
"Objective-C object or block pointer}1 types; type here is %2">,
ExpectedObjectiveCInterface,
ExpectedMethodOrProperty,
ExpectedStructOrUnion,
- ExpectedStructOrUnionOrClass
+ ExpectedStructOrUnionOrClass,
+ ExpectedType
};
//===----------------------------------------------------------------------===//
if (TD == 0) {
// __attribute__((ext_vector_type(N))) can only be applied to typedefs
// and type-ids.
- S.Diag(Attr.getLoc(), diag::err_typecheck_ext_vector_not_typedef);
+ S.Diag(Attr.getLoc(), diag::err_attribute_wrong_decl_type) <<
+ Attr.getName() << ExpectedType;
return;
}