From 3e39fa365d63bec23eda1eb08d8d5d358c03c189 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 26 Jun 2008 06:39:41 +0000 Subject: [PATCH] add a comment about something that was surprising, at least to me. llvm-svn: 52771 --- clang/lib/Sema/SemaDecl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index cdcdebae8171..86d3ef4b0e43 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -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(New)) { QualType newType = HandleModeTypeAttribute(tDecl->getUnderlyingType(), Attr);