Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaObjCXX / block-for-lambda-conversion.mm
blob671e83dc2201939b1068c860aa65111705d9d9c6
1 // RUN: %clang_cc1 -fsyntax-only -fblocks -verify -std=c++11 %s
3 enum NSEventType {
4   NSEventTypeFlagsChanged = 12
5 };
7 enum NSEventMask {
8   NSEventMaskLeftMouseDown = 1
9 };
11 static const NSEventType NSFlagsChanged = NSEventTypeFlagsChanged;
13 @interface NSObject
14 @end
15 @interface NSEvent : NSObject {
17 + (nullable id)
18 addMonitor:(NSEventMask)mask handler:(NSEvent *_Nullable (^)(NSEvent *))block;
19 @end
21 void test(id weakThis) {
22   id m_flagsChangedEventMonitor = [NSEvent
23       addMonitor:NSFlagsChangedMask //expected-error {{use of undeclared identifier 'NSFlagsChangedMask'}}
24          handler:[weakThis](NSEvent *flagsChangedEvent) {
25              return flagsChangedEvent;
26          }];