diff options
Diffstat (limited to 'clang/lib/Analysis/PathDiagnostic.cpp')
-rw-r--r-- | clang/lib/Analysis/PathDiagnostic.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Analysis/PathDiagnostic.cpp b/clang/lib/Analysis/PathDiagnostic.cpp index fa075a39595..946548e02cc 100644 --- a/clang/lib/Analysis/PathDiagnostic.cpp +++ b/clang/lib/Analysis/PathDiagnostic.cpp @@ -158,12 +158,13 @@ FullSourceLoc PathDiagnosticLocation::asLocation() const { return FullSourceLoc(R.getBegin(), const_cast<SourceManager&>(*SM)); } -SourceRange PathDiagnosticLocation::asRange() const { +PathDiagnosticRange PathDiagnosticLocation::asRange() const { assert(isValid()); // Note that we want a 'switch' here so that the compiler can warn us in // case we add more cases. switch (K) { case SingleLocK: + return PathDiagnosticRange(R, true); case RangeK: break; case StmtK: { @@ -201,7 +202,7 @@ SourceRange PathDiagnosticLocation::asRange() const { } else { SourceLocation L = D->getLocation(); - return SourceRange(L, L); + return PathDiagnosticRange(SourceRange(L, L), true); } } |