diff options
author | Cameron Desrochers <cameron@moodycamel.com> | 2016-08-18 15:43:55 +0000 |
---|---|---|
committer | Cameron Desrochers <cameron@moodycamel.com> | 2016-08-18 15:43:55 +0000 |
commit | d80912871d9a96fa06b904ee73113defe3ff8689 (patch) | |
tree | fd8b8e60d6e087aaeb88253bab4af2d825a15d49 /clang/include/clang-c | |
parent | ccdceda1282fa48f304e0cd0c1b6f6861be7dcd3 (diff) | |
download | bcm5719-llvm-d80912871d9a96fa06b904ee73113defe3ff8689.tar.gz bcm5719-llvm-d80912871d9a96fa06b904ee73113defe3ff8689.zip |
[libclang] Add clang_getAllSkippedRanges function
This complements the clang_getSkippedRanges function which returns skipped ranges filtered by a specific file.
This function is useful when all the ranges are desired (and a lot more efficient than the equivalent of asking for the ranges file by file, since the implementation of clang_getSkippedRanges iterates over all ranges anyway).
Differential Revision: https://reviews.llvm.org/D20132
llvm-svn: 279076
Diffstat (limited to 'clang/include/clang-c')
-rw-r--r-- | clang/include/clang-c/Index.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 170e4e7fad5..192560e9d51 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -627,6 +627,15 @@ CINDEX_LINKAGE CXSourceRangeList *clang_getSkippedRanges(CXTranslationUnit tu, CXFile file); /** + * \brief Retrieve all ranges from all files that were skipped by the + * preprocessor. + * + * The preprocessor will skip lines when they are surrounded by an + * if/ifdef/ifndef directive whose condition does not evaluate to true. + */ +CINDEX_LINKAGE CXSourceRangeList *clang_getAllSkippedRanges(CXTranslationUnit tu); + +/** * \brief Destroy the given \c CXSourceRangeList. */ CINDEX_LINKAGE void clang_disposeSourceRangeList(CXSourceRangeList *ranges); |