diff options
author | Reid Kleckner <rnk@google.com> | 2017-05-22 21:42:58 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-05-22 21:42:58 +0000 |
commit | eb00ee07beff4fab367fa16b8074ba9856469f52 (patch) | |
tree | 3637cd56cb1854a57d96615c43e6062e6ebf031e /clang/lib/Frontend/FrontendAction.cpp | |
parent | b238cb8fbca233fef4a65e1ef3e28bb4f1eb42f2 (diff) | |
download | bcm5719-llvm-eb00ee07beff4fab367fa16b8074ba9856469f52.tar.gz bcm5719-llvm-eb00ee07beff4fab367fa16b8074ba9856469f52.zip |
Give files from #line the characteristics of the current file
This allows #line directives to appear in system headers that have code
that clang would normally warn on. This is compatible with GCC, which is
easy to test by running `gcc -E`.
Fixes PR30752
llvm-svn: 303582
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendAction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index 1fbb2b054ba..874c1b6be41 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -252,7 +252,8 @@ static SourceLocation ReadOriginalFileName(CompilerInstance &CI, if (AddLineNote) CI.getSourceManager().AddLineNote( - LineNoLoc, LineNo, SourceMgr.getLineTableFilenameID(InputFile)); + LineNoLoc, LineNo, SourceMgr.getLineTableFilenameID(InputFile), false, + false, SrcMgr::C_User); return T.getLocation(); } |