Check the return type of operator[]() and fix a thinko that lead to a crash in SemaCXX/overloaded-operator.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84041 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/incomplete-call.cpp b/test/SemaCXX/incomplete-call.cpp
index cdb81f3..4decd86 100644
--- a/test/SemaCXX/incomplete-call.cpp
+++ b/test/SemaCXX/incomplete-call.cpp
@@ -1,5 +1,5 @@
 // RUN: clang-cc -fsyntax-only -verify %s
-struct A; // expected-note 10 {{forward declaration of 'struct A'}}
+struct A; // expected-note 11 {{forward declaration of 'struct A'}}
 
 A f(); // expected-note {{note: 'f' declared here}}
 
@@ -9,6 +9,7 @@
   operator A(); // expected-note {{'operator A' declared here}}
   A operator!(); // expected-note 2 {{'operator!' declared here}}
   A operator++(int); // expected-note {{'operator++' declared here}}
+  A operator[](int); // expected-note {{'operator[]' declared here}}
 };
 
 void g() {
@@ -29,4 +30,5 @@
   !b; // expected-error {{calling 'operator!' with incomplete return type 'struct A'}}
   b(); // expected-error {{calling 'operator()' with incomplete return type 'struct A'}}
   b++; // expected-error {{calling 'operator++' with incomplete return type 'struct A'}}
+  b[0]; // expected-error {{calling 'operator[]' with incomplete return type 'struct A'}}
 }