--- /dev/null
+// Test that this unreachable code warning is
+// not reported because it is in a header.
+
+void foo_unreachable_header() {
+ return;
+ foo_unreachable_header(); // no-warning
+}
\ No newline at end of file
-// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks -Wunreachable-code -Wno-unused-value -Wno-covered-switch-default
+// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks -Wunreachable-code -Wno-unused-value -Wno-covered-switch-default -I %S/Inputs
+
+#include "warn-unreachable.h"
int halt() __attribute__((noreturn));
int live();