aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-04-25 09:32:00 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-04-25 09:32:00 +0000
commit27ae6c6531ac13e4b316e7e0e7b7c846b61a8d15 (patch)
tree3e126611bab99f402087443c2b9112632c5abe27 /include/clang
parent4b443a614278e99c46cba3d53ee04546920ff165 (diff)
initial support for recognizing __transparent_union__ attributes
comments on the ML will follow git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/AST/Attr.h13
-rw-r--r--include/clang/Parse/AttributeList.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h
index 72bc8a9ffa..abdcfb4b05 100644
--- a/include/clang/AST/Attr.h
+++ b/include/clang/AST/Attr.h
@@ -36,7 +36,8 @@ public:
Format,
Visibility,
FastCall,
- StdCall
+ StdCall,
+ TransparentUnion
};
private:
@@ -218,6 +219,16 @@ public:
static bool classof(const StdCallAttr *A) { return true; }
};
+class TransparentUnionAttr : public Attr {
+public:
+ TransparentUnionAttr() : Attr(TransparentUnion) {}
+
+ // Implement isa/cast/dyncast/etc.
+
+ static bool classof(const Attr *A) { return A->getKind() == TransparentUnion; }
+ static bool classof(const TransparentUnionAttr *A) { return true; }
+};
+
} // end namespace clang
#endif
diff --git a/include/clang/Parse/AttributeList.h b/include/clang/Parse/AttributeList.h
index c71f8ff1f8..418dc00ac9 100644
--- a/include/clang/Parse/AttributeList.h
+++ b/include/clang/Parse/AttributeList.h
@@ -64,6 +64,7 @@ public:
AT_stdcall,
AT_nothrow,
AT_noinline,
+ AT_transparent_union,
AT_warn_unused_result
};