Browse Source

libclang: prevent infinite loop when searching for symbol documentation

merge-requests/395/head
eidheim 7 years ago
parent
commit
40c19bc252
  1. 2
      src/source_clang.cc

2
src/source_clang.cc

@ -1588,7 +1588,7 @@ Source::ClangViewRefactor::ClangViewRefactor(const boost::filesystem::path &file
} }
last_cursor = cursor; last_cursor = cursor;
cursor = cursor.get_semantic_parent(); cursor = cursor.get_semantic_parent();
} while(cursor.get_kind() != clangmm::Cursor::Kind::TranslationUnit); } while(cursor && cursor.get_kind() != clangmm::Cursor::Kind::TranslationUnit);
if(last_cursor.get_kind() != clangmm::Cursor::Kind::Namespace) if(last_cursor.get_kind() != clangmm::Cursor::Kind::Namespace)
data.emplace(++data.begin(), ""); data.emplace(++data.begin(), "");

Loading…
Cancel
Save