From ffc860be91930f52f14193f9ee4166931e2e8fab Mon Sep 17 00:00:00 2001 From: Lance Richardson Date: Wed, 28 Sep 2016 14:41:05 -0400 Subject: [PATCH] sparse: ignore __assume_aligned__ attribute The __assume_aligned__ attribute can be safely ignored, add it to the list of ignored attributes and add a test to verify that this attribute is ignored. Signed-off-by: Lance Richardson Signed-off-by: Christopher Li --- parse.c | 2 ++ validation/attr_aligned.c | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 validation/attr_aligned.c diff --git a/parse.c b/parse.c index 2e0edcad..66f9353f 100644 --- a/parse.c +++ b/parse.c @@ -512,6 +512,8 @@ const char *ignored_attributes[] = { "__always_inline__", "artificial", "__artificial__", + "assume_aligned", + "__assume_aligned__", "bounded", "__bounded__", "cdecl", diff --git a/validation/attr_aligned.c b/validation/attr_aligned.c new file mode 100644 index 00000000..dc44e9fd --- /dev/null +++ b/validation/attr_aligned.c @@ -0,0 +1,6 @@ +void *foo(void) __attribute__((__assume_aligned__(4096))); +void *foo(void) __attribute__((assume_aligned(4096))); +/* + * check-name: attribute assume_aligned + */ + -- 2.11.4.GIT