summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion/call.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-01-21 15:46:19 +0000
committerDouglas Gregor <dgregor@apple.com>2010-01-21 15:46:19 +0000
commitff59f676d04eeeabe29935d16d581ead23a21ef0 (patch)
tree088e00193a8f19163107573b00f6a54f82031c1f /clang/test/CodeCompletion/call.c
parent232085d50a4f33b8590f32697ae32924c165fa61 (diff)
downloadbcm5719-llvm-ff59f676d04eeeabe29935d16d581ead23a21ef0.tar.gz
bcm5719-llvm-ff59f676d04eeeabe29935d16d581ead23a21ef0.zip
Teach code-completion to deal with calls to functions without prototypes.
llvm-svn: 94076
Diffstat (limited to 'clang/test/CodeCompletion/call.c')
-rw-r--r--clang/test/CodeCompletion/call.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CodeCompletion/call.c b/clang/test/CodeCompletion/call.c
new file mode 100644
index 00000000000..8210389ffa5
--- /dev/null
+++ b/clang/test/CodeCompletion/call.c
@@ -0,0 +1,15 @@
+// Note: the run lines follow their respective tests, since line/column
+// matter in this test.
+void f0(float x, float y);
+void f1();
+void test() {
+ f0(0, 0);
+ g0(0, 0);
+ f1(0, 0);
+ // RUN: %clang_cc1 -std=c89 -fsyntax-only -code-completion-at=%s:6:6 %s -o - | FileCheck -check-prefix=CC1 %s
+ // CHECK-CC1: f0(<#float x#>, float y)
+ // RUN: %clang_cc1 -std=c89 -fsyntax-only -code-completion-at=%s:6:9 %s -o - | FileCheck -check-prefix=CC2 %s
+ // CHECK-CC2: f0(float x, <#float y#>)
+ // RUN: %clang_cc1 -std=c89 -fsyntax-only -code-completion-at=%s:8:6 %s -o - | FileCheck -check-prefix=CC3 %s
+ // CHECK-CC3: f1()
+}
OpenPOWER on IntegriCloud