llvm-project/clang/tools
Douglas Gregor cd8bdd025f Improve performance during cursor traversal when a region of interest
is present. 

Rather than using clang_getCursorExtent(), which requires
us to lex the token at the ending position to determine its
length. Then, we'd be comparing [a, b) source ranges that cover the
characters in the range rather than the normal behavior for Clang's
source ranges, which covers the tokens in the range. However, relexing
causes us to read the source file (which may come from a precompiled
header), which is rather unfortunate and affects performance.

In the new scheme, we only use Clang-style source ranges that cover
the tokens in the range. At the entry points where this matters
(clang_annotateTokens, clang_getCursor), we make sure to move source
locations to the start of the token.

Addresses most of <rdar://problem/8049381>.

llvm-svn: 109134
2010-07-22 20:22:31 +00:00
..
c-index-test This was still complaining about the length of the string. I've broken it here 2010-07-22 06:29:13 +00:00
driver Introduce a new lexer function to compute the "preamble" of a file, 2010-07-20 20:18:03 +00:00
libclang Improve performance during cursor traversal when a region of interest 2010-07-22 20:22:31 +00:00
scan-build Forward -fno-builtin to clang, add .cp as a supported 2010-07-03 03:08:23 +00:00
scan-view Increase scan-view max timeout to 1 minute. 2009-05-04 19:02:41 +00:00
CMakeLists.txt Rename 'CIndex' to 'libclang', since it has basically become our stable public 2010-04-30 21:51:10 +00:00
Makefile Minix doesn't support dylibs, PR7294 2010-06-29 05:05:09 +00:00