diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-01-03 19:44:02 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-01-03 19:44:02 +0000 |
commit | 3437f1f1294499d4ef306c1089fcb3e29ec2aa68 (patch) | |
tree | 87da70c55989fd61cdaa0eb884c71e6d7578c492 /test/Index/code-complete-errors.c | |
parent | dcaa1ca0b475dfa887e1d061678a1e3501288510 (diff) |
Speed up code-completion by skipping function bodies.
When we are in code-completion mode, skip parsing of all function bodies except the one where the
code-completion point resides.
For big .cpp files like 'SemaExpr.cpp' the improvement makes a huge difference, in some cases cutting down
code-completion time -62% !
We don't get diagnostics for the bodies though, so modify the code-completion tests that check for errors.
See rdar://8814203.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/code-complete-errors.c')
-rw-r--r-- | test/Index/code-complete-errors.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/test/Index/code-complete-errors.c b/test/Index/code-complete-errors.c deleted file mode 100644 index 51cfb895e2..0000000000 --- a/test/Index/code-complete-errors.c +++ /dev/null @@ -1,25 +0,0 @@ -_Complex cd; // CHECK: code-complete-errors.c:1:1: warning: plain '_Complex' requires a type specifier; assuming '_Complex double' -// CHECK: FIX-IT: Insert " double" at 1:9 -struct s { - int x, y;; // CHECK: code-complete-errors.c:4:12: warning: extra ';' inside a struct -}; // CHECK: FIX-IT: Remove [4:12 - 4:13] - -struct s s0 = { y: 5 }; // CHECK: code-complete-errors.c:7:20: warning: use of GNU old-style field designator extension -// CHECK: FIX-IT: Replace [7:17 - 7:19] with ".y = " -int f(int *ptr1, float *ptr2) { - return ptr1 != ptr2; // CHECK: code-complete-errors.c:10:15:{10:10-10:14}{10:18-10:22}: warning: comparison of distinct pointer types ('int *' and 'float *') -} - -#define expand_to_binary_function(ret, name, parm1, parm2, code) ret name(parm1, parm2) code - -expand_to_binary_function(int, g, int *ip, float *fp, { - // CHECK: code-complete-errors.c:17:12:{17:9-17:24}: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] - if (ip = (float*)fp) ; -// CHECK: code-complete-errors.c:19:15:{19:12-19:14}{19:18-19:20}: warning: comparison of distinct pointer types ('int *' and 'float *') - return ip == fp; - }) - -void g() { } - -// RUN: c-index-test -code-completion-at=%s:21:12 -pedantic %s 2> %t -// RUN: FileCheck -check-prefix=CHECK %s < %t |