logic: fixed infinite iteration in cxx brace recording

This commit is contained in:
mlangkabel
2018-07-23 18:21:29 +02:00
parent ed0ade034e
commit fdc99a2935
@@ -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<clang::Token> token = clang::Lexer::findNextToken(endLoc, sm, opts);
if (token.hasValue())