Support locally-declared external declarations in PCH files

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69833 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/PCH/nonvisible-external-defs.c b/test/PCH/nonvisible-external-defs.c
new file mode 100644
index 0000000..bfe5cca
--- /dev/null
+++ b/test/PCH/nonvisible-external-defs.c
@@ -0,0 +1,10 @@
+// Test this without pch.
+// RUN: clang-cc -include %S/nonvisible-external-defs.h -fsyntax-only -verify %s &&
+
+// Test with pch.
+// RUN: clang-cc -emit-pch -o %t %S/nonvisible-external-defs.h &&
+// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s 
+
+int g(int, float); // expected-error{{conflicting types}}
+
+// expected-note{{previous declaration}}