You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
688 B
28 lines
688 B
// 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;
|
|
}];
|
|
}
|