mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Enabled clang in support project and enabled warning for unrecognized selectors. Added clang statements to ignore warning for JMC selectors if JMC is not part of the project.
This commit is contained in:
parent
8e1678a924
commit
fe4307fb65
2 changed files with 15 additions and 0 deletions
|
|
@ -61,6 +61,8 @@
|
|||
}
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wundeclared-selector"
|
||||
+ (id)jmcInstance {
|
||||
id jmcClass = NSClassFromString(@"JMC");
|
||||
if ((jmcClass) && ([jmcClass respondsToSelector:@selector(sharedInstance)])) {
|
||||
|
|
@ -74,6 +76,7 @@
|
|||
|
||||
return nil;
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
+ (BOOL)isJMCActive {
|
||||
id jmcInstance = [self jmcInstance];
|
||||
|
|
@ -86,6 +89,8 @@
|
|||
|
||||
#pragma mark - Private Class Methods
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wundeclared-selector"
|
||||
+ (void)disableJMCCrashReporter {
|
||||
id jmcInstance = [self jmcInstance];
|
||||
id jmcOptions = [jmcInstance performSelector:@selector(options)];
|
||||
|
|
@ -99,6 +104,7 @@
|
|||
[invocation setArgument:&value atIndex:2];
|
||||
[invocation invoke];
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
+ (BOOL)checkJMCConfiguration:(NSDictionary *)configuration {
|
||||
return (([configuration isKindOfClass:[NSDictionary class]]) &&
|
||||
|
|
@ -108,6 +114,8 @@
|
|||
([[configuration valueForKey:@"project"] length] > 0));
|
||||
}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wundeclared-selector"
|
||||
+ (void)applyJMCConfiguration:(NSDictionary *)configuration {
|
||||
id jmcInstance = [self jmcInstance];
|
||||
SEL configureSelector = @selector(configureJiraConnect:projectKey:apiKey:);
|
||||
|
|
@ -124,6 +132,7 @@
|
|||
[invocation setArgument:&key atIndex:4];
|
||||
[invocation invoke];
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
#pragma mark - Public Instance Methods (Configuration)
|
||||
|
||||
|
|
|
|||
|
|
@ -288,9 +288,12 @@
|
|||
GCC_VERSION = "";
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_STRICT_SELECTOR_MATCH = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 3.0;
|
||||
OTHER_CFLAGS = "";
|
||||
RUN_CLANG_STATIC_ANALYZER = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
name = Debug;
|
||||
|
|
@ -309,9 +312,12 @@
|
|||
GCC_VERSION = "";
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_STRICT_SELECTOR_MATCH = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 3.0;
|
||||
OTHER_CFLAGS = "";
|
||||
RUN_CLANG_STATIC_ANALYZER = YES;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue