From 847a9015a0ab1e238bfe34466a553eca41099b26 Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 19 May 2016 11:44:13 +0200 Subject: [PATCH] Corrected clang::Token_* to clang::TokenKind::Token_* --- src/source_clang.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/source_clang.cc b/src/source_clang.cc index c5b4ab6..5333d13 100644 --- a/src/source_clang.cc +++ b/src/source_clang.cc @@ -422,7 +422,7 @@ void Source::ClangViewParse::show_type_tooltips(const Gdk::Rectangle &rectangle) type_tooltips.clear(); for(auto &token: *tokens) { auto cursor=token.get_cursor(); - if(token.get_kind()==clang::Token_Identifier && cursor.has_type()) { + if(token.get_kind()==clang::TokenKind::Token_Identifier && cursor.has_type()) { if(token.get_cursor().get_kind()==clang::CursorKind::CallExpr) //These cursors are buggy continue; auto start=get_buffer()->get_iter_at_line_index(token.offsets.first.line-1, token.offsets.first.index-1); @@ -912,7 +912,7 @@ Source::ClangViewAutocomplete(file_path, language) { auto cursor=token.get_cursor(); auto cursor_kind=cursor.get_kind(); auto parent_cursor=cursor.get_semantic_parent(); - if(token.get_kind()==clang::Token_Identifier && + if(token.get_kind()==clang::TokenKind::Token_Identifier && (cursor_kind==clang::CursorKind::Constructor || cursor_kind==clang::CursorKind::Destructor) && parent_cursor.get_usr()==identifier.cursor.get_usr() && cursor.has_type()) { identifiers.emplace(cursor.get_kind(), token.get_spelling(), cursor.get_usr()); @@ -976,7 +976,7 @@ Source::ClangViewAutocomplete(file_path, language) { auto index=static_cast(iter.get_line_index()); for(auto &token: *clang_tokens) { auto cursor=token.get_cursor(); - if(token.get_kind()==clang::Token_Identifier && cursor.has_type()) { + if(token.get_kind()==clang::TokenKind::Token_Identifier && cursor.has_type()) { if(line==token.offsets.first.line-1 && index>=token.offsets.first.index-1 && index <=token.offsets.second.index-1) { auto referenced=cursor.get_referenced(); if(referenced) { @@ -1009,7 +1009,7 @@ Source::ClangViewAutocomplete(file_path, language) { auto kind=cursor.get_kind(); if((kind==clang::CursorKind::FunctionDecl || kind==clang::CursorKind::CXXMethod || kind==clang::CursorKind::Constructor || kind==clang::CursorKind::Destructor) && - token_it->get_kind()==clang::Token_Identifier && cursor.has_type()) { + token_it->get_kind()==clang::TokenKind::Token_Identifier && cursor.has_type()) { auto referenced=cursor.get_referenced(); if(referenced && identifier.kind==referenced.get_kind() && identifier.spelling==token_it->get_spelling() && identifier.usr==referenced.get_usr()) { @@ -1161,7 +1161,7 @@ Source::ClangViewAutocomplete(file_path, language) { auto index=static_cast(iter.get_line_index()); for(auto &token: *clang_tokens) { auto cursor=token.get_cursor(); - if(token.get_kind()==clang::Token_Identifier && cursor.has_type()) { + if(token.get_kind()==clang::TokenKind::Token_Identifier && cursor.has_type()) { if(line==token.offsets.first.line-1 && index>=token.offsets.first.index-1 && index <=token.offsets.second.index-1) { auto referenced=cursor.get_referenced(); if(referenced) { @@ -1302,7 +1302,7 @@ Source::ClangViewRefactor::Identifier Source::ClangViewRefactor::get_identifier( auto index=static_cast(iter.get_line_index()); for(auto &token: *clang_tokens) { auto cursor=token.get_cursor(); - if(token.get_kind()==clang::Token_Identifier && cursor.has_type()) { + if(token.get_kind()==clang::TokenKind::Token_Identifier && cursor.has_type()) { if(line==token.offsets.first.line-1 && index>=token.offsets.first.index-1 && index <=token.offsets.second.index-1) { if(token.get_cursor().get_kind()==clang::CursorKind::CallExpr) //These cursors are buggy continue;