[PATCH] D35186: [analyzer] Add annotation for functions taking user-facing strings

Erik Verbruggen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 9 12:47:25 PDT 2017


erikjv created this revision.
Herald added a subscriber: xazax.hun.

There was already a returns_localized_nsstring annotation to indicate
that the return value could be passed to UIKit methods that would
display them. However, those UIKit methods were hard-coded, and it was
not possible to indicate that other classes/methods in a code-base would
do the same.

The takes_localized_nsstring annotation can be put on function
parameters and selector parameters to indicate that those will also show
the string to the user.


https://reviews.llvm.org/D35186

Files:
  lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
  test/Analysis/localization-aggressive.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35186.105791.patch
Type: text/x-patch
Size: 5903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170709/fcda6384/attachment.bin>


More information about the cfe-commits mailing list