]> granicus.if.org Git - clang/commit
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)
commitecac99cbb4fc1411a821718d6c254333641c1198
tree0b500ceefacf6f6e4e21eb016f3f67b77db7d7ea
parentd13b68220b0e39325f1cb21ef4ccb6543178460e
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303582 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/SourceManager.h
include/clang/Basic/SourceManagerInternals.h
lib/Basic/SourceManager.cpp
lib/Frontend/FrontendAction.cpp
lib/Lex/PPDirectives.cpp
lib/Lex/Pragma.cpp
test/Frontend/Inputs/SystemHeaderPrefix/line.h [new file with mode: 0644]
test/Frontend/Inputs/SystemHeaderPrefix/noline.h [new file with mode: 0644]
test/Frontend/system-header-line-directive.c [new file with mode: 0644]