Skip to content
This repository was archived by the owner on Jun 12, 2018. It is now read-only.

Commit 6a9f24a

Browse files
committed
Removed unneeded const return qualifiers, replaced a couple old c-casts, and updated FindLibClang.cmake
1 parent b0fb1f7 commit 6a9f24a

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

cmake/Modules/FindLibClang.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
# Known LLVM release numbers.
1515

1616
# most recent versions come first
17-
set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.7
17+
set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.9
18+
3.8.1
19+
3.8
20+
3.7.1
21+
3.7
1822
3.6.2
1923
3.6.1
2024
3.6

src/Cursor.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#include "Utility.h"
33
#include <algorithm>
44

5-
const clang::CursorKind clang::Cursor::get_kind() {
6-
return (CursorKind) clang_getCursorKind(this->cx_cursor);
5+
clang::CursorKind clang::Cursor::get_kind() {
6+
return static_cast<CursorKind>(clang_getCursorKind(this->cx_cursor));
77
}
88

99
clang::SourceLocation clang::Cursor::get_source_location() const {

src/Cursor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ namespace clang {
177177
class Cursor {
178178
public:
179179
Cursor(const CXCursor &cx_cursor) : cx_cursor(cx_cursor) {}
180-
const CursorKind get_kind();
180+
CursorKind get_kind();
181181
SourceLocation get_source_location() const;
182182
SourceRange get_source_range() const;
183183
std::string get_spelling() const;

src/Token.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ std::string clang::Token::get_spelling() {
2020
return clang::to_string(clang_getTokenSpelling(cx_tu, cx_token));
2121
}
2222

23-
const clang::TokenKind clang::Token::get_kind() {
24-
return (TokenKind) clang_getTokenKind(cx_token);
23+
clang::TokenKind clang::Token::get_kind() {
24+
return static_cast<TokenKind>(clang_getTokenKind(cx_token));
2525
}

src/Token.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace clang {
2020
Token(CXTranslationUnit &cx_tu, CXToken &cx_token, CXCursor &cx_cursor):
2121
cx_tu(cx_tu), cx_token(cx_token), cx_cursor(cx_cursor), offsets(get_source_range().get_offsets()) {};
2222
public:
23-
const TokenKind get_kind();
23+
TokenKind get_kind();
2424
std::string get_spelling();
2525
SourceLocation get_source_location();
2626
SourceRange get_source_range();

0 commit comments

Comments
 (0)