diff options
Diffstat (limited to 'clang/lib/Frontend/TextDiagnostic.cpp')
-rw-r--r-- | clang/lib/Frontend/TextDiagnostic.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Frontend/TextDiagnostic.cpp b/clang/lib/Frontend/TextDiagnostic.cpp index 01d2b10..3cdf86f 100644 --- a/clang/lib/Frontend/TextDiagnostic.cpp +++ b/clang/lib/Frontend/TextDiagnostic.cpp @@ -868,10 +868,11 @@ void TextDiagnostic::emitDiagnosticLoc(FullSourceLoc Loc, PresumedLoc PLoc, } void TextDiagnostic::emitIncludeLocation(FullSourceLoc Loc, PresumedLoc PLoc) { - if (DiagOpts->ShowLocation && PLoc.isValid()) - OS << "In file included from " << PLoc.getFilename() << ':' - << PLoc.getLine() << ":\n"; - else + if (DiagOpts->ShowLocation && PLoc.isValid()) { + OS << "In file included from "; + emitFilename(PLoc.getFilename(), Loc.getManager()); + OS << ':' << PLoc.getLine() << ":\n"; + } else OS << "In included file:\n"; } |