Programming Search⌘K

Objective-C lints

The lint rules of Objective-C, with what each one finds. This page has 40 cards.

Check that addresses to stack memory do not escape the function that involves dispatch_after or dispatch_async. alpha.core.StackAddressAsyncEscape

This checker is a part of core.StackAddressEscape, but is temporarily disabled until some false positives are fixed. It is an experimental (alpha) checker, so the analyzer does not run it by default. It applies to Objective-C.

Code
alpha.core.StackAddressAsyncEscape

Source: github.com, clang.llvm.org. JSON record. This entry is a card. Help write this page.

Check that NSLocalizedString macros include a comment for context. optin.osx.cocoa.localizability.EmptyLocalizationContextChecker

It is an opt-in checker, so the analyzer runs it only when you enable it. clang-tidy runs it as the check clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker. It applies to Objective-C.

Code
optin.osx.cocoa.localizability.EmptyLocalizationContextChecker

Source: github.com, clang.llvm.org. JSON record. This entry is a card. Help write this page.

Warns about uses of non-localized NSStrings passed to UI methods expecting localized NSStrings. optin.osx.cocoa.localizability.NonLocalizedStringChecker

It is an opt-in checker, so the analyzer runs it only when you enable it. clang-tidy runs it as the check clang-analyzer-optin.osx.cocoa.localizability.NonLocalizedStringChecker. It applies to Objective-C.

Code
optin.osx.cocoa.localizability.NonLocalizedStringChecker

Source: github.com, clang.llvm.org. JSON record. This entry is a card. Help write this page.

This checker warns when the denominator in a division operation is a tainted (potentially attacker controlled) value. optin.taint.TaintedDiv

If the attacker can set the denominator to 0, a runtime error can be triggered. The checker warns when the denominator is a tainted value and the analyzer cannot prove that it is not 0. It is an opt-in checker, so the analyzer runs it only when you enable it. clang-tidy runs it as the check clang-analyzer-optin.taint.TaintedDiv. It applies to C, C++, Objective-C.

Code
optin.taint.TaintedDiv

Source: github.com, clang.llvm.org. JSON record. This entry is a card. Help write this page.