]> granicus.if.org Git - clang/commit
[libclang] Introduce a new indexing mode where we skip function bodies
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 6 Dec 2012 19:41:16 +0000 (19:41 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 6 Dec 2012 19:41:16 +0000 (19:41 +0000)
commit838eb7e8652e451d93494a4e583e4d11809bcb4a
tree332e35e9347d8749ea095f61cf08f697f158e38d
parent14491490a5276ff4da9b28100fb8e7d442944288
[libclang] Introduce a new indexing mode where we skip function bodies
that were already parsed in the same "indexing session".

An indexing session is defined as using the same CXIndexAction object
for multiple clang_indexSourceFile calls.
Passing CXIndexOpt_SkipParsedBodiesInSession as an indexing option will
enable the mode where we try to skip bodies that were already parsed in
another translation unit.

If a function's body was skipped, the "flags" field in the CXIdxDeclInfo
structure will have "CXIdxDeclFlag_Skipped" bit was set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169539 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang-c/Index.h
test/Index/skip-parsed-bodies/compile_commands.json [new file with mode: 0644]
test/Index/skip-parsed-bodies/lit.local.cfg [new file with mode: 0644]
test/Index/skip-parsed-bodies/t.h [new file with mode: 0644]
test/Index/skip-parsed-bodies/t1.cpp [new file with mode: 0644]
test/Index/skip-parsed-bodies/t2.cpp [new file with mode: 0644]
test/Index/skip-parsed-bodies/t3.cpp [new file with mode: 0644]
tools/c-index-test/c-index-test.c
tools/libclang/Indexing.cpp
tools/libclang/IndexingContext.cpp
tools/libclang/IndexingContext.h