[cfe-commits] r52771 - /cfe/trunk/lib/Sema/SemaDecl.cpp

Chris Lattner sabre at nondot.org
Wed Jun 25 23:39:42 PDT 2008


Author: lattner
Date: Thu Jun 26 01:39:41 2008
New Revision: 52771

URL: http://llvm.org/viewvc/llvm-project?rev=52771&view=rev
Log:
add a comment about something that was surprising, at least to me.

Modified:
    cfe/trunk/lib/Sema/SemaDecl.cpp

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=52771&r1=52770&r2=52771&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Thu Jun 26 01:39:41 2008
@@ -2353,6 +2353,9 @@
     // 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);





More information about the cfe-commits mailing list