In LookupResult::resolveKind(), when handling multiple found declarations, ignore invalid declarations.
This reduces the "ambiguous reference" errors (which are rather strange in C/ObjC) and fixes an assertion hit
with an invalid code test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175869 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/invalid-decl.c b/test/Sema/invalid-decl.c
index 4e62881..950d51d 100644
--- a/test/Sema/invalid-decl.c
+++ b/test/Sema/invalid-decl.c
@@ -42,3 +42,7 @@
void test2();
void test2(undef); // expected-error {{a parameter list without types is only allowed in a function definition}}
void test2() { }
+
+void test3();
+void test3; // expected-error {{incomplete type}}
+void test3() { }