]> granicus.if.org Git - clang/commit
[libclang] Allow skipping function bodies in preamble only
authorIvan Donchevskii <ivan.donchevskii@qt.io>
Thu, 17 May 2018 09:24:37 +0000 (09:24 +0000)
committerIvan Donchevskii <ivan.donchevskii@qt.io>
Thu, 17 May 2018 09:24:37 +0000 (09:24 +0000)
commit94fc51b9dea325cb6fcfa108f22a8dbb526057ad
tree9c30885c805b523302173f44ffde2e7330f6ac53
parent3303890be9b4217dfa673c5d0647a9bd2ae31851
[libclang] Allow skipping function bodies in preamble only

Second attempt. Fix line endings and warning.

As an addition to CXTranslationUnit_SkipFunctionBodies, provide the
new option CXTranslationUnit_LimitSkipFunctionBodiesToPreamble,
which constraints the skipping of functions bodies to the preamble
only. Function bodies in the main file are not affected if this
option is set.

Skipping function bodies only in the preamble is what clangd already
does and the introduced flag implements it for libclang clients.

Patch by Nikolai Kosjar.

Differential Revision: https://reviews.llvm.org/D45815

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332587 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang-c/Index.h
include/clang/Frontend/ASTUnit.h
lib/Frontend/ASTUnit.cpp
test/Parser/skip-function-bodies.h [new file with mode: 0644]
test/Parser/skip-function-bodies.mm
tools/c-index-test/c-index-test.c
tools/libclang/CIndex.cpp