зеркало из https://github.com/microsoft/clang-1.git
[libclang] Protect against the declaration's SourceRange being invalid
before passing to RangeCompare. Though no idea how this can occur with the decls returned from findFileRegionDecls(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145301 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
21480b7638
Коммит
ed8bef44c0
|
@ -286,6 +286,8 @@ void CursorVisitor::visitDeclsFromFileRegion(FileID File,
|
|||
SmallVector<Decl *, 16>::iterator DIt = Decls.begin();
|
||||
for (SmallVector<Decl *, 16>::iterator DE = Decls.end(); DIt != DE; ++DIt) {
|
||||
Decl *D = *DIt;
|
||||
if (D->getSourceRange().isInvalid())
|
||||
continue;
|
||||
|
||||
if (isInLexicalContext(D, CurDC))
|
||||
continue;
|
||||
|
|
Загрузка…
Ссылка в новой задаче