Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Rewriter / rewrite-elaborated-type.mm
blobf9dcea78932519fd2a8a2cb0773254a20781bfb4
1 // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
2 // RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Wno-address-of-temporary -D_Bool=bool -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3 // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
4 // RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Wno-address-of-temporary -D_Bool=bool -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
6 typedef struct objc_class *Class;
7 typedef unsigned NSPointerFunctionsOptions;
8 extern "C" id NSClassFromObject(id object);
9 void *sel_registerName(const char *);
11 struct NSSlice {
12   int i1;
15 @interface NSConcretePointerFunctions {
16   @public
17     struct NSSlice slice;
19 - (bool)initializeSlice:(struct NSSlice *)slicep withOptions:(NSPointerFunctionsOptions)options;
20 @end
22 @implementation NSConcretePointerFunctions
23 - (id)initWithOptions:(NSPointerFunctionsOptions)options {
24       if (![NSClassFromObject(self) initializeSlice:&slice withOptions:options])
25         return 0;
26       return self;
27   }
28 - (bool)initializeSlice:(struct NSSlice *)slicep withOptions:(NSPointerFunctionsOptions)options {
29     return 0;
30   }
31 @end
33 @interface I1 @end
35 @implementation I1
36 + (struct s1 *) f0 {
37   return 0;
39 @end