From fdc99a2935b6c7259e1ff02e765b947412468d9f Mon Sep 17 00:00:00 2001 From: mlangkabel Date: Mon, 23 Jul 2018 18:21:29 +0200 Subject: [PATCH] logic: fixed infinite iteration in cxx brace recording --- src/lib_cxx/data/parser/cxx/CxxAstVisitorComponentIndexer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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())