diff options
author | Lance Richardson <lrichard@redhat.com> | 2016-09-28 14:41:05 -0400 |
---|---|---|
committer | Christopher Li <sparse@chrisli.org> | 2016-10-13 04:13:15 -0700 |
commit | ffc860be91930f52f14193f9ee4166931e2e8fab (patch) | |
tree | d1ab4e60ba3456682e9961afd0e757eb8e1deb42 | |
parent | 65f90e77057687ad5a6e8196d99aaf93bd0f5443 (diff) | |
download | sparse-ffc860be91930f52f14193f9ee4166931e2e8fab.tar.gz |
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 <lrichard@redhat.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r-- | parse.c | 2 | ||||
-rw-r--r-- | validation/attr_aligned.c | 6 |
2 files changed, 8 insertions, 0 deletions
@@ -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 + */ + |