]> granicus.if.org Git - clang/commit
[libclang] Allow skipping function bodies in preamble only
authorIvan Donchevskii <ivan.donchevskii@qt.io>
Thu, 17 May 2018 07:31:29 +0000 (07:31 +0000)
committerIvan Donchevskii <ivan.donchevskii@qt.io>
Thu, 17 May 2018 07:31:29 +0000 (07:31 +0000)
commit96865fb14c773fbc314c0533e3286300d37ee406
tree22d0852c5c2affc56c77a57bbea1ffa9a32aee9b
parente831748eaaa33bd543f5474ecd4cb76cbdc46b29
[libclang] Allow skipping function bodies in preamble only

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@332578 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