From d571fed293e75394c32d1e87a8395fdc61084e6b Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 17 Mar 2018 10:04:12 -0700 Subject: [PATCH] Fix skipped region in clang 6.0.0; add repology badge; remove -latomic --- README.md | 17 ++++++++++------- src/clang_indexer.cc | 2 ++ wscript | 1 - 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 22648ec2..2aca86c1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# cquery - [![Join the chat at https://gitter.im/cquery-project/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cquery-project/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +# cquery + cquery is a highly-scalable, low-latency language server for C/C++/Objective-C. It is tested and designed for large code bases like [Chromium](https://chromium.googlesource.com/chromium/src/). cquery provides @@ -14,14 +14,13 @@ some extra features to boot: * code completion (with both signature help and snippets) * finding definition/references - * type hierarchy (parent type, derived types, expandable tree view) - * finding base/derived methods/classes, call tree + * call (caller/callee) hierarchy, inheritance (base/derived) hierarchy, member hierarchy * symbol rename - * document and global symbol search - * hover tooltips showing symbol type + * [document symbols](src/messages/text_document_document_symbol.cc) and approximate search of [workspace symbol](src/messages/workspace_symbol.cc) + * [hover information](src/messages/text_document_hover.cc) * diagnostics * code actions (clang FixIts) - * darken/fade code disabled by preprocessor + * preprocessor skipped regions * #include auto-complete, undefined type include insertion, include quick-jump (goto definition, document links) * auto-implement functions without a definition @@ -29,6 +28,10 @@ some extra features to boot: # >>> [Getting started](https://github.com/jacobdufault/cquery/wiki/Getting-started) (CLICK HERE) <<< + + Packaging status + + # Limitations cquery is able to respond to queries quickly because it caches a huge amount of diff --git a/src/clang_indexer.cc b/src/clang_indexer.cc index df82f242..e4596639 100644 --- a/src/clang_indexer.cc +++ b/src/clang_indexer.cc @@ -361,9 +361,11 @@ IndexFile* ConsumeFile(IndexParam* param, CXFile file) { CXSourceRangeList* skipped = clang_getSkippedRanges(param->tu->cx_tu, file); for (unsigned i = 0; i < skipped->count; ++i) { Range range = ResolveCXSourceRange(skipped->ranges[i]); +#if CINDEX_VERSION < 45 // Before clang 6.0.0 // clang_getSkippedRanges reports start one token after the '#', move it // back so it starts at the '#' range.start.column -= 1; +#endif db->skipped_by_preprocessor.push_back(range); } clang_disposeSourceRangeList(skipped); diff --git a/wscript b/wscript index fa6c0f76..9be6c600 100644 --- a/wscript +++ b/wscript @@ -339,7 +339,6 @@ def build(bld): if sys.platform.startswith('linux'): # For __atomic_* when lock free instructions are unavailable # (either through hardware or OS support) - lib.append('atomic') lib.append('pthread') # loguru calls dladdr lib.append('dl')