llvm-capstone/clang/test/Preprocessor/header_is_main_file.c
Erik Verbruggen e0bde7554c 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
2016-10-27 14:17:10 +00:00

9 lines
208 B
C

// RUN: %clang_cc1 -x c-header -ffreestanding -Eonly -verify %s
// expected-no-diagnostics
#pragma once
#include_next "stdint.h"
#if !__has_include_next("stdint.h")
#error "__has_include_next failed"
#endif