summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/Attr.td
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-03-30 21:48:55 +0000
committerErich Keane <erich.keane@intel.com>2017-03-30 21:48:55 +0000
commit70854ab835598d27a6cce2b268120735b0c8c101 (patch)
tree4e94605a6fdc7e6e71c6c1ee6776db4c6d809f3a /include/clang/Basic/Attr.td
parent7463d9e8e343a7144b1ad88b0835c4a1c1787976 (diff)
Clang changes for alloc_align attribute
GCC has the alloc_align attribute, which is similar to assume_aligned, except the attribute's parameter is the index of the integer parameter that needs aligning to. Differential Revision: https://reviews.llvm.org/D29599 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299117 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/Attr.td')
-rw-r--r--include/clang/Basic/Attr.td8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td
index cc1d4b2f9d..c5d2c7fc61 100644
--- a/include/clang/Basic/Attr.td
+++ b/include/clang/Basic/Attr.td
@@ -1225,6 +1225,14 @@ def AssumeAligned : InheritableAttr {
let Documentation = [AssumeAlignedDocs];
}
+def AllocAlign : InheritableAttr {
+ let Spellings = [GCC<"alloc_align">];
+ let Subjects = SubjectList<[HasFunctionProto], WarnDiag,
+ "ExpectedFunctionWithProtoType">;
+ let Args = [IntArgument<"ParamIndex">];
+ let Documentation = [AllocAlignDocs];
+}
+
def NoReturn : InheritableAttr {
let Spellings = [GCC<"noreturn">, Declspec<"noreturn">];
// FIXME: Does GCC allow this on the function instead?