// RUN: %check %s

struct A
{
	int i;
};

void take(void *);

int f(const void *p)
{
	struct A *a = p; // CHECK: warning: implicit cast removes qualifiers (const)
	struct A *b = (struct A *)p; // CHECK: !/warning:.*cast removes qualifiers/

	(void)a;
	(void)b;

	const char c = 5;
	take(&c); // CHECK: warning: implicit cast removes qualifiers (const)
}

// RUN: %check %s

struct A
{
	int i;
};

int f(const void *p)
{
	struct A *a = p; // CHECK: warning: implicit cast removes qualifiers (const)
	struct A *b = (struct A *)p; // CHECK: !/warning:.*cast removes qualifiers/

	(void)a;
	(void)b;
}

--- 
+++ 
@@ -4,6 +4,8 @@
 {
 	int i;
 };
+
+void take(void *);
 
 int f(const void *p)
 {
@@ -12,4 +14,7 @@
 
 	(void)a;
 	(void)b;
+
+	const char c = 5;
+	take(&c); // CHECK: warning: implicit cast removes qualifiers (const)
 }
Add another case to qualifier-removal test
