"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,
<< "aligned" << alignmentExpr->getSourceRange();
return;
}
+ if (!llvm::isPowerOf2_64(Alignment.getZExtValue())) {
+ S.Diag(Attr.getLoc(), diag::err_attribute_aligned_not_power_of_two)
+ << alignmentExpr->getSourceRange();
+ return;
+ }
+
d->addAttr(new AlignedAttr(Alignment.getZExtValue() * 8));
}