cquery-project / emacs-cquery

Emacs client for cquery, a low-latency language server supporting multi-million line C++ code-bases
116 stars 14 forks source link

cquery--set-inactive-regions error #27

Closed nickenchev closed 6 years ago

nickenchev commented 6 years ago

Hey, updated my emacs packages today and started seeing this error:

screen shot 2018-03-16 at 4 26 49 pm

Any way for me to resolve this, or do you need to push an update? Its causing short freezes when I open/save files so its a little frustrating at the moment.

Thanks

zurdmont commented 6 years ago

I'm getting the same error. I used a config with just emacs-cquery and didn't get the error, but when I add in lsp-mode it starts popping up.

MaskRay commented 6 years ago

This was because

    // Report skipped source range list.
    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);
    }

Fixed in https://github.com/cquery-project/cquery/commit/f84683f42e8886aaf5d986ff8ffc360a063713c2