
The signature was changed from void(char *, char *) to void(void *, void *) to match GCC's signature for the same builtin. Fixes #47833
13 lines
491 B
C
13 lines
491 B
C
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
// Ensure that __builtin___clear_cache has the expected signature. Clang used
|
|
// to have a signature accepting char * while GCC had a signature accepting
|
|
// void * that was documented incorrectly.
|
|
void test(void) {
|
|
int n = 0;
|
|
__builtin___clear_cache(&n, &n + 1); // Ok
|
|
|
|
__builtin___clear_cache((const void *)&n, (const void *)(&n + 1)); // expected-warning 2 {{passing 'const void *' to parameter of type 'void *' discards qualifiers}}
|
|
}
|
|
|