write a line marker right before adding included file
Enclosing the original #include directive inside #if 0 adds lines,
so warning/errors messages would have the line number off in
"In file included from <file>:<line>:", so add line marker to fix this.
llvm-svn: 207756
diff --git a/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp b/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp
index 058960d..70b2992 100644
--- a/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp
+++ b/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp
@@ -383,6 +383,7 @@
case tok::pp_import: {
CommentOutDirective(RawLex, HashToken, FromFile, EOL, NextToWrite,
Line);
+ WriteLineInfo(FileName, Line - 1, FileType, EOL, "");
StringRef LineInfoExtra;
if (const FileChange *Change = FindFileChangeLocation(
HashToken.getLocation())) {