diff --git a/src/lib_cxx/data/parser/cxx/CxxAstVisitorComponentIndexer.cpp b/src/lib_cxx/data/parser/cxx/CxxAstVisitorComponentIndexer.cpp index cd582429..177e36db 100644 --- a/src/lib_cxx/data/parser/cxx/CxxAstVisitorComponentIndexer.cpp +++ b/src/lib_cxx/data/parser/cxx/CxxAstVisitorComponentIndexer.cpp @@ -785,7 +785,7 @@ ParseLocation CxxAstVisitorComponentIndexer::getSignatureLocation(clang::Functio const clang::LangOptions& opts = m_astContext->getLangOpts(); clang::SourceLocation endLoc = FTL.getSourceRange().getEnd(); - while (endLoc < signatureRange.getEnd()) + while (sm.isBeforeInTranslationUnit(endLoc, signatureRange.getEnd())) { llvm::Optional token = clang::Lexer::findNextToken(endLoc, sm, opts); if (token.hasValue())