Example #1
0
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;
}
Example #2
0
bool Sema::ActOnAttrSpec(SourceLocation Loc, DeclSpec &DS, DeclSpec::AS Val) {
  if (DS.hasAttributeSpec(Val)) {
    Diags.Report(Loc, diag::err_duplicate_attr_spec)
      << DeclSpec::getSpecifierName(Val);
    return true;
  }
  DS.setAttributeSpec(Val);
  return false;
}
Example #3
0
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;
}