aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/type-attribute-qual.c
diff options
context:
space:
mode:
Diffstat (limited to 'validation/type-attribute-qual.c')
-rw-r--r--validation/type-attribute-qual.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/validation/type-attribute-qual.c b/validation/type-attribute-qual.c
new file mode 100644
index 00000000..62d8b98e
--- /dev/null
+++ b/validation/type-attribute-qual.c
@@ -0,0 +1,15 @@
+static const struct s {
+ int x;
+} map[2];
+
+static void foo(struct s *p, int v)
+{
+ p->x += v;
+}
+
+/*
+ * check-name: type-attribute-qual
+ * check-description: When declaring a type and a variable in the same
+ * declaration, ensure that type qualifiers apply to the variable
+ * and not to the type.
+ */