summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor
diff options
context:
space:
mode:
authorErik Verbruggen <erikjv@me.com>2016-10-27 14:17:10 +0000
committerErik Verbruggen <erikjv@me.com>2016-10-27 14:17:10 +0000
commite0bde7554ce04ef7af99c69d526882a56f54a928 (patch)
treea62a277df65a36bb68e905945eadb07a6b4efb70 /clang/test/Preprocessor
parent7cc713adcb668c23cbac71cfd7f268dd5afb618d (diff)
downloadbcm5719-llvm-e0bde7554ce04ef7af99c69d526882a56f54a928.tar.gz
bcm5719-llvm-e0bde7554ce04ef7af99c69d526882a56f54a928.zip
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
Diffstat (limited to 'clang/test/Preprocessor')
-rw-r--r--clang/test/Preprocessor/header_is_main_file.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/header_is_main_file.c b/clang/test/Preprocessor/header_is_main_file.c
new file mode 100644
index 00000000000..03ade13ff33
--- /dev/null
+++ b/clang/test/Preprocessor/header_is_main_file.c
@@ -0,0 +1,8 @@
+// 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
OpenPOWER on IntegriCloud