]> granicus.if.org Git - clang/commitdiff
add a comment about something that was surprising, at least to me.
authorChris Lattner <sabre@nondot.org>
Thu, 26 Jun 2008 06:39:41 +0000 (06:39 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 26 Jun 2008 06:39:41 +0000 (06:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52771 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp

index cdcdebae8171db5204637bb06213ef171b4bb0a7..86d3ef4b0e43fd6f678b664f96ded59ece62ad5f 100644 (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);