Skip to content

Commit 8b52d23

Browse files
committed
Add a function pointer test case
1 parent 59b558d commit 8b52d23

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/test/SemaCXX/warn-thread-safety-parsing.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,8 @@ void elr_function_args() EXCLUSIVE_LOCKS_REQUIRED(mu1, mu2);
10931093

10941094
int elr_testfn(int y) EXCLUSIVE_LOCKS_REQUIRED(mu1);
10951095

1096+
int EXCLUSIVE_LOCKS_REQUIRED(mu1) (*function_ptr)(int);
1097+
10961098
int elr_testfn(int y) {
10971099
int x EXCLUSIVE_LOCKS_REQUIRED(mu1) = y; // \
10981100
// expected-warning {{'exclusive_locks_required' attribute only applies to functions}}

0 commit comments

Comments
 (0)