add a comment about something that was surprising, at least to me.

llvm-svn: 52771
This commit is contained in:
Chris Lattner 2008-06-26 06:39:41 +00:00
parent 2239b7d3d2
commit 3e39fa365d
1 changed files with 3 additions and 0 deletions

View File

@ -2353,6 +2353,9 @@ void Sema::HandleDeclAttribute(Decl *New, AttributeList *Attr) {
// Ignore this, this is a type attribute, handled by ProcessTypeAttributes.
break;
case AttributeList::AT_mode:
// Despite what would be logical, the mode attribute is a decl attribute,
// not a type attribute: 'int ** __attribute((mode(HI))) *G;' tries to make
// 'G' be HImode, not an intermediate pointer.
if (TypedefDecl *tDecl = dyn_cast<TypedefDecl>(New)) {
QualType newType = HandleModeTypeAttribute(tDecl->getUnderlyingType(),
Attr);