Do not print include_next/pragma once warnings when input is a header.
authorErik Verbruggen <erikjv@me.com>
Thu, 27 Oct 2016 14:17:10 +0000 (14:17 +0000)
committerErik Verbruggen <erikjv@me.com>
Thu, 27 Oct 2016 14:17:10 +0000 (14:17 +0000)
commite0bde7554ce04ef7af99c69d526882a56f54a928
treea62a277df65a36bb68e905945eadb07a6b4efb70
parent7cc713adcb668c23cbac71cfd7f268dd5afb618d
Do not print include_next/pragma once warnings when input is a header.

r276653 suppressed the pragma once warning when generating a PCH file.
This patch extends that to any main file for which clang is told (with
the -x option) that it's a header file. It will also suppress the
warning "#include_next in primary source file".

Differential Revision: http://reviews.llvm.org/D25989

llvm-svn: 285295
clang/include/clang/Basic/LangOptions.h
clang/lib/Basic/LangOptions.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Lex/PPDirectives.cpp
clang/lib/Lex/PPMacroExpansion.cpp
clang/lib/Lex/Pragma.cpp
clang/test/Preprocessor/header_is_main_file.c [new file with mode: 0644]