aboutsummaryrefslogtreecommitdiff
path: root/clang
diff options
context:
space:
mode:
authorDevin Coughlin <dcoughlin@apple.com>2016-05-06 18:13:30 +0000
committerDevin Coughlin <dcoughlin@apple.com>2016-05-06 18:13:30 +0000
commit37d3264a3062f8e7d46c1c143f59db07f30df53d (patch)
treeba76a55720cb68b580655103c38098f3dc448324 /clang
parent1cb6241a8960df0846fa22646bf49f088519d293 (diff)
downloadllvm-37d3264a3062f8e7d46c1c143f59db07f30df53d.zip
llvm-37d3264a3062f8e7d46c1c143f59db07f30df53d.tar.gz
llvm-37d3264a3062f8e7d46c1c143f59db07f30df53d.tar.bz2
[www][analyzer] Update recommended suppression mechanism for localization.
Based on feedback from Jordan Rose, make the recommended suppression function be 'static inline'. llvm-svn: 268768
Diffstat (limited to 'clang')
-rw-r--r--clang/www/analyzer/faq.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/www/analyzer/faq.html b/clang/www/analyzer/faq.html
index c5e33a3..cf3dc70 100644
--- a/clang/www/analyzer/faq.html
+++ b/clang/www/analyzer/faq.html
@@ -84,10 +84,10 @@ You can add <tt>__attribute__((unused))</tt> to the instance variable declaratio
<p>When the analyzer sees that an unlocalized string is passed to a method that will present that string to the user, it is going to produce a message similar to this one:
<pre class="code_example">User-facing text should use localized string macro</pre>
-If your project deliberately uses unlocalized user-facing strings (for example, in a debugging UI that is never shown to customers), you can suppress the analyzer warnings (and document your intent) with a function that just returns its input but is annotated to return a localized string:
+If your project deliberately uses unlocalized user-facing strings (for example, in a debugging UI that is never shown to users), you can suppress the analyzer warnings (and document your intent) with a function that just returns its input but is annotated to return a localized string:
<pre class="code_example">
__attribute__((annotate("returns_localized_nsstring")))
-NSString *LocalizationNotNeeded(NSString *s) {
+static inline NSString *LocalizationNotNeeded(NSString *s) {
return s;
}
</pre>