foo()1*f4a2713aSLionel Sambuc int foo() { }
bar(float * f)2*f4a2713aSLionel Sambuc int *bar(float *f) { return f; }
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc // RUN: c-index-test -test-load-source all %s 2>&1|FileCheck -check-prefix=CHECK-BOTH-WARNINGS %s
5*f4a2713aSLionel Sambuc // RUN: c-index-test -test-load-source-reparse 5 all %s 2>&1|FileCheck -check-prefix=CHECK-BOTH-WARNINGS %s
6*f4a2713aSLionel Sambuc // RUN: c-index-test -test-load-source all -Wno-return-type %s 2>&1|FileCheck -check-prefix=CHECK-SECOND-WARNING %s
7*f4a2713aSLionel Sambuc // RUN: c-index-test -test-load-source-reparse 5 all -Wno-return-type %s 2>&1|FileCheck -check-prefix=CHECK-SECOND-WARNING %s
8*f4a2713aSLionel Sambuc // RUN: c-index-test -test-load-source all -w %s 2>&1|not grep warning:
9*f4a2713aSLionel Sambuc // RUN: c-index-test -test-load-source-reparse 5 all -w %s 2>&1|not grep warning:
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambuc // CHECK-BOTH-WARNINGS: warning: control reaches end of non-void function
12*f4a2713aSLionel Sambuc // CHECK-BOTH-WARNINGS: warning: incompatible pointer types returning 'float *' from a function with result type 'int *'
13*f4a2713aSLionel Sambuc
14*f4a2713aSLionel Sambuc // CHECK-SECOND-WARNING-NOT:control reaches end of non-void
15*f4a2713aSLionel Sambuc // CHECK-SECOND-WARNING: warning: incompatible pointer types returning 'float *' from a function with result type 'int *'
16*f4a2713aSLionel Sambuc
17