diff --git a/clang/www/analyzer/faq.html b/clang/www/analyzer/faq.html index cf3dc70035f6..26ed91a88f1b 100644 --- a/clang/www/analyzer/faq.html +++ b/clang/www/analyzer/faq.html @@ -29,6 +29,7 @@ null?
  • How do I tell the static analyzer that I don't care about a specific dead store?
  • How do I tell the static analyzer that I don't care about a specific unused instance variable in Objective C?
  • How do I tell the static analyzer that I don't care about a specific unlocalized string?
  • +
  • How do I tell the analyzer that my instance variable does not need to be released in -dealloc under Manual Retain/Release?
  • The analyzer assumes that a loop body is never entered. How can I tell it that the loop body will be entered at least once?
  • How can I suppress a specific analyzer warning?
  • How can I selectively exclude code the analyzer examines?
  • @@ -105,6 +106,15 @@ NSString *s = NSLocalizedString(@"Hello <Do Not Localize>", @"For debug pu

    +

    Q: How do I tell the analyzer that my instance variable does not need to be released in -dealloc under Manual Retain/Release?

    + +

    If your class only uses an instance variable for part of its lifetime, it may +maintain an invariant guaranteeing that the instance variable is always released +before -dealloc. In this case, you can silence a warning about a missing release +by either adding assert(_ivar == nil) or an explicit release +[_ivar release] (which will be a no-op when the variable is nil) in +-dealloc.

    +

    Q: The analyzer assumes that a loop body is never entered. How can I tell it that the loop body will be entered at least once?

    example use assert