Speed up code-completion by skipping function bodies.
commit089f59e936e25e9fd0d465b5c1dfe6a8c0e11e02
authorArgiris Kirtzidis <akyrtzi@gmail.com>
Mon, 3 Jan 2011 19:44:02 +0000 (3 19:44 +0000)
committerArgiris Kirtzidis <akyrtzi@gmail.com>
Mon, 3 Jan 2011 19:44:02 +0000 (3 19:44 +0000)
tree87da70c55989fd61cdaa0eb884c71e6d7578c492
parentb09d17a44184cd4c0cd81f51af4db03db35983ff
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
include/clang/Lex/Preprocessor.h
include/clang/Parse/Parser.h
lib/Parse/ParseStmt.cpp
lib/Parse/Parser.cpp
test/Index/code-complete-errors.c [deleted file]
test/Index/remap-complete.c