diff options
Diffstat (limited to 'validation/function-attribute.c')
| -rw-r--r-- | validation/function-attribute.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/validation/function-attribute.c b/validation/function-attribute.c new file mode 100644 index 00000000..0f2c7592 --- /dev/null +++ b/validation/function-attribute.c @@ -0,0 +1,19 @@ +#define __pure __attribute__((pure)) + +struct s { + int x; +}; + +static __pure struct s *grab(struct s *ptr) +{ + return ptr; +} + +static void foo(struct s *ptr) +{ + struct s *ptr = grab(ptr); +} + +/* + * check-name: function-attribute + */ |
