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

Commit 5eb017c

Browse files
committed
Added version check to Cursor::get_type
1 parent 8d83d9c commit 5eb017c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Cursor.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ std::string clang::Cursor::get_type() {
5151
auto type=clang_getCursorType(referenced);
5252
spelling=clang::to_string(clang_getTypeSpelling(type));
5353

54+
#if CINDEX_VERSION_MAJOR==0 && CINDEX_VERSION_MINOR<32
5455
const std::string auto_str="auto";
5556
if(spelling.size()>=4 && std::equal(auto_str.begin(), auto_str.end(), spelling.begin())) {
5657
auto canonical_type=clang_getCanonicalType(clang_getCursorType(cx_cursor));
@@ -71,6 +72,8 @@ std::string clang::Cursor::get_type() {
7172
return canonical_spelling;
7273
}
7374
}
75+
#endif
76+
7477
return spelling;
7578
}
7679

0 commit comments

Comments
 (0)