Give files from #line the characteristics of the current file
authorReid Kleckner <rnk@google.com>
Mon, 22 May 2017 21:42:58 +0000 (21:42 +0000)
committerReid Kleckner <rnk@google.com>
Mon, 22 May 2017 21:42:58 +0000 (21:42 +0000)
commiteb00ee07beff4fab367fa16b8074ba9856469f52
tree3637cd56cb1854a57d96615c43e6062e6ebf031e
parentb238cb8fbca233fef4a65e1ef3e28bb4f1eb42f2
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
clang/include/clang/Basic/SourceManager.h
clang/include/clang/Basic/SourceManagerInternals.h
clang/lib/Basic/SourceManager.cpp
clang/lib/Frontend/FrontendAction.cpp
clang/lib/Lex/PPDirectives.cpp
clang/lib/Lex/Pragma.cpp
clang/test/Frontend/Inputs/SystemHeaderPrefix/line.h [new file with mode: 0644]
clang/test/Frontend/Inputs/SystemHeaderPrefix/noline.h [new file with mode: 0644]
clang/test/Frontend/system-header-line-directive.c [new file with mode: 0644]