summaryrefslogtreecommitdiff
path: root/test/SemaObjC/ivar-sem-check-1.m
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-25 08:47:54 +0000
committerChris Lattner <sabre@nondot.org>2009-04-25 08:47:54 +0000
commit5153ee66d6d4fb37b02f85df38e48dc8b46660df (patch)
tree09fbc6dd5a9a2953119ac1935394f0aa08453342 /test/SemaObjC/ivar-sem-check-1.m
parent6e4750188e836e119f8605cbd34023d0a3b18011 (diff)
downloadclang-5153ee66d6d4fb37b02f85df38e48dc8b46660df.tar.gz
Change SemaType's "GetTypeForDeclarator" and "ConvertDeclSpecToType" to
always return a non-null QualType + error bit. This fixes a bunch of cases that didn't check for null result (and could thus crash) and eliminates some crappy code scattered throughout sema. This also improves the diagnostics in the recursive struct case to eliminate a bogus second error. It also cleans up the case added to function.c by forming a proper function type even though the declarator is erroneous, allowing the parameter to be added to the function. Before: t.c:2:1: error: unknown type name 'unknown_type' unknown_type f(void*P) ^ t.c:4:3: error: use of undeclared identifier 'P' P+1; ^ After: t.c:2:1: error: unknown type name 'unknown_type' unknown_type f(void*P) ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/ivar-sem-check-1.m')
-rw-r--r--test/SemaObjC/ivar-sem-check-1.m3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/SemaObjC/ivar-sem-check-1.m b/test/SemaObjC/ivar-sem-check-1.m
index ab9f6b163c..957abc397e 100644
--- a/test/SemaObjC/ivar-sem-check-1.m
+++ b/test/SemaObjC/ivar-sem-check-1.m
@@ -9,8 +9,7 @@ typedef int FOO();
int arr[]; // expected-error {{field has incomplete type}}
struct S IC; // expected-error {{field has incomplete type}}
struct T { // expected-note {{previous definition is here}}
- struct T {} X; // expected-error {{nested redefinition of 'T'}} \
- expected-error {{field has incomplete type}}
+ struct T {} X; // expected-error {{nested redefinition of 'T'}}
}YYY;
FOO BADFUNC; // expected-error {{field 'BADFUNC' declared as a function}}
int kaka; // expected-note {{previous declaration is here}}