diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2016-11-09 23:58:39 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2016-11-09 23:58:39 +0000 |
commit | 3b61b92e0fdf5093a247270ef1265c85697de3f9 (patch) | |
tree | a8c393db7c1846228ee4ef67193d2f064f8be904 /tools | |
parent | 3b3f2f613e907670a1245e740a582ef011395059 (diff) |
[libclang] Fix issue with clang_tokenize and make sure it interprets CXSourceRange as half-open character range.
Patch provided by Emilio Cobos Álvarez! (https://reviews.llvm.org/D26446)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libclang/CIndex.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 17fe88b631..98a6e70fd6 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -6156,7 +6156,7 @@ static void getTokens(ASTUnit *CXXUnit, SourceRange Range, } CXTokens.push_back(CXTok); previousWasAt = Tok.is(tok::at); - } while (Lex.getBufferLocation() <= EffectiveBufferEnd); + } while (Lex.getBufferLocation() < EffectiveBufferEnd); } void clang_tokenize(CXTranslationUnit TU, CXSourceRange Range, |