Skip to content

Commit 516aa05

Browse files
committed
Add extra test.
1 parent 66cb83b commit 516aa05

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/test/Sema/attr-cfi-salt.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ void (*fp2)(int) = func2;
5757
void func3(int) __cfi_salt("pepper"); // ok
5858
void func3(int a) __cfi_salt("pepper") { } // ok
5959
void (* __cfi_salt("pepper") fp3)(int) = func3; // ok
60+
void (*fp3_noattr)(int) = func3;
61+
// expected-error@-1{{incompatible function pointer types initializing 'void (*)(int)' with an expression of type 'void (int)'}}
6062

6163
void func4(int) [[clang::cfi_salt("test")]]; // ok
6264
void func4(int a) [[clang::cfi_salt("test")]] { } // ok
6365
void (* [[clang::cfi_salt("test")]] fp4)(int) = func4; // ok
66+
void (*fp4_noattr)(int) = func4;
67+
// expected-error@-1{{incompatible function pointer types initializing 'void (*)(int)' with an expression of type 'void (int)'}}

0 commit comments

Comments
 (0)