summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Pragma.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-05-22 21:42:58 +0000
committerReid Kleckner <rnk@google.com>2017-05-22 21:42:58 +0000
commiteb00ee07beff4fab367fa16b8074ba9856469f52 (patch)
tree3637cd56cb1854a57d96615c43e6062e6ebf031e /clang/lib/Lex/Pragma.cpp
parentb238cb8fbca233fef4a65e1ef3e28bb4f1eb42f2 (diff)
downloadbcm5719-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.cpp4
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.
OpenPOWER on IntegriCloud