aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-06-26 06:39:41 +0000
committerChris Lattner <sabre@nondot.org>2008-06-26 06:39:41 +0000
commitd546fc5f2072d93bb475fdd76cd7b629a08ad93b (patch)
treeeec7cb9256f7d2e4cd1acf6988c5c49c0734ff33 /lib/Sema/SemaDecl.cpp
parentf37da0ea0e25f66b122fe2e73c2ea04dcb2cd253 (diff)
add a comment about something that was surprising, at least to me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index cdcdebae81..86d3ef4b0e 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/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<TypedefDecl>(New)) {
QualType newType = HandleModeTypeAttribute(tDecl->getUnderlyingType(),
Attr);