add parsing for ObjC* method & method parm attributes
[gcc.git] / gcc / testsuite / obj-c++.dg / const-str-12.mm
1 /* Test if ObjC types play nice in conditional expressions. */
2 /* Author: Ziemowit Laski */
3
4 /* { dg-options "-fconstant-string-class=Foo" } */
5 /* { dg-do compile } */
6
7 #include "../objc-obj-c++-shared/Object1.h"
8
9 @interface Foo: Object {
10 char *cString;
11 unsigned int len;
12 }
13 + (id)description;
14 @end
15
16 @interface Bar: Object
17 + (Foo *) getString: (int) which;
18 @end
19
20 struct objc_class _FooClassReference;
21
22 @implementation Bar
23 + (Foo *) getString: (int) which {
24 return which? [Foo description]: @"Hello";
25 }
26 @end