[PATCH] D11572: [Static Analyzer] Checker for OS X / iOS localizability issues
Kulpreet Chilana via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 14:21:03 PDT 2015
kulpreet marked an inline comment as done.
================
Comment at: test/Analysis/localization-aggressive.m:202
@@ +201,3 @@
+// EmptyLocalizationContextChecker tests
+#define HOM(s) YOLOC(s)
+#define YOLOC(x) NSLocalizedString(x, nil)
----------------
zaks.anna wrote:
> How about something like this, where the last argument to the user defined macro is nil, but it has noting to do with the comment.
>
> #define POSSIBLE_FALSE_POSITIVE(s, myarg) YOLOC(s)
>
> ..
> POSSIBLE_FALSE_POSITIVE(@"Hello", nil)
I added a regression test for this and it seems to not produce a false positive. This makes sense because the Lexer will only lex through NSLocalizedString macros.
http://reviews.llvm.org/D11572
More information about the cfe-commits
mailing list