bool Sema::ActOnObjectArraySpec(ASTContext &C, SourceLocation Loc, DeclSpec &DS, ArrayRef<ArraySpec*> Dimensions) { if(!DS.hasAttributeSpec(DeclSpec::AS_dimension)) DS.setAttributeSpec(DeclSpec::AS_dimension); DS.setDimensions(Dimensions); return false; }
bool Sema::ActOnDimensionAttrSpec(ASTContext &C, SourceLocation Loc, DeclSpec &DS, ArrayRef<ArraySpec*> Dimensions) { if (DS.hasAttributeSpec(DeclSpec::AS_dimension)) { Diags.Report(Loc, diag::err_duplicate_attr_spec) << DeclSpec::getSpecifierName(DeclSpec::AS_dimension); return true; } DS.setAttributeSpec(DeclSpec::AS_dimension); DS.setDimensions(Dimensions); return false; }