aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/codesearch/testdata/refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/codesearch/testdata/refs.c')
-rw-r--r--pkg/codesearch/testdata/refs.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkg/codesearch/testdata/refs.c b/pkg/codesearch/testdata/refs.c
new file mode 100644
index 000000000..9b6b2633f
--- /dev/null
+++ b/pkg/codesearch/testdata/refs.c
@@ -0,0 +1,34 @@
+// Copyright 2025 syzkaller project authors. All rights reserved.
+// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+int refs0()
+{
+ return 0;
+}
+
+void refs1()
+{
+}
+
+void refs2(void (*)(), int)
+{
+}
+
+void refs3()
+{
+ refs2(refs1, refs0());
+ (void)refs2;
+}
+
+void long_func_with_ref()
+{
+ refs0();
+ refs1();
+ refs0();
+ refs1();
+ refs2(refs1, refs0());
+ refs0();
+ refs1();
+ refs0();
+ refs1();
+}