зеркало из https://github.com/microsoft/clang-1.git
don't crash on invalid ranges in -fprint-source-range-info
mode, just ignore them as usual. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69558 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
5b912d9832
Коммит
74548e67d8
|
@ -267,6 +267,9 @@ void TextDiagnosticPrinter::HandleDiagnostic(Diagnostic::Level Level,
|
|||
bool PrintedRange = false;
|
||||
|
||||
for (unsigned i = 0, e = Info.getNumRanges(); i != e; ++i) {
|
||||
// Ignore invalid ranges.
|
||||
if (!Info.getRange(i).isValid()) continue;
|
||||
|
||||
SourceLocation B = Info.getRange(i).getBegin();
|
||||
SourceLocation E = Info.getRange(i).getEnd();
|
||||
std::pair<FileID, unsigned> BInfo=SM.getDecomposedInstantiationLoc(B);
|
||||
|
|
Загрузка…
Ссылка в новой задаче