diff options
Diffstat (limited to 'clang/test/Analysis/localization.m')
| -rw-r--r-- | clang/test/Analysis/localization.m | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/Analysis/localization.m b/clang/test/Analysis/localization.m index ce55609b1bf..cf0697c76f5 100644 --- a/clang/test/Analysis/localization.m +++ b/clang/test/Analysis/localization.m @@ -90,6 +90,13 @@ NSString *KHLocalizedString(NSString* key, NSString* comment) { [testLabel setText:bar]; // no-warning } + +// Suppress diagnostic about user-facing string constants when the method name +// contains the term "Debug". +- (void)debugScreen:(UILabel *)label { + label.text = @"Unlocalized"; +} + // Plural Misuse Checker Tests // These tests are modeled off incorrect uses of the many-one pattern // from real projects. @@ -205,3 +212,15 @@ NSString *KHLocalizedString(NSString* key, NSString* comment) { // } @end + + +// Suppress diagnostic about user-facing string constants when the class name +// contains "Debug" +@interface MyDebugView : NSObject +@end + +@implementation MyDebugView +- (void)setupScreen:(UILabel *)label { + label.text = @"Unlocalized"; +} +@end |

