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/Lex/Pragma.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/Lex/Pragma.cpp')
-rw-r--r-- | clang/lib/Lex/Pragma.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp index 99d56182c1b..2d078a4e760 100644 --- a/clang/lib/Lex/Pragma.cpp +++ b/clang/lib/Lex/Pragma.cpp @@ -475,9 +475,9 @@ void Preprocessor::HandlePragmaSystemHeader(Token &SysHeaderTok) { // Emit a line marker. This will change any source locations from this point // forward to realize they are in a system header. // Create a line note with this information. - SourceMgr.AddLineNote(SysHeaderTok.getLocation(), PLoc.getLine()+1, + SourceMgr.AddLineNote(SysHeaderTok.getLocation(), PLoc.getLine() + 1, FilenameID, /*IsEntry=*/false, /*IsExit=*/false, - /*IsSystem=*/true, /*IsExternC=*/false); + SrcMgr::C_System); } /// HandlePragmaDependency - Handle \#pragma GCC dependency "foo" blah. |