blob: 671e83dc2201939b1068c860aa65111705d9d9c6 [file] [log] [blame]
// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -std=c++11 %s
enum NSEventType {
NSEventTypeFlagsChanged = 12
};
enum NSEventMask {
NSEventMaskLeftMouseDown = 1
};
static const NSEventType NSFlagsChanged = NSEventTypeFlagsChanged;
@interface NSObject
@end
@interface NSEvent : NSObject {
}
+ (nullable id)
addMonitor:(NSEventMask)mask handler:(NSEvent *_Nullable (^)(NSEvent *))block;
@end
void test(id weakThis) {
id m_flagsChangedEventMonitor = [NSEvent
addMonitor:NSFlagsChangedMask //expected-error {{use of undeclared identifier 'NSFlagsChangedMask'}}
handler:[weakThis](NSEvent *flagsChangedEvent) {
return flagsChangedEvent;
}];
}