rdar://25301111
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Looks good with updated diagnostic text and a test for non-ARC behavior.
lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp | ||
---|---|---|
11 ↗ | (On Diff #139696) | I would say "warns about writes to autoreleasing out parameters that are likely to cause crashes". |
16 ↗ | (On Diff #139696) | I would use the -enumerateObjectsUsingBlock: as the canonical example. The queue/threading aspect is incidental to the problem here. |
102 ↗ | (On Diff #139696) | The queue aspect is incidental here. I suggest: "write to autoreleasing out parameter inside autorelease pool that may exit before function returns; consider writing first to a strong local variable declared outside of the block" and "write to autoreleasing out parameter inside autorelease pool that may exit before method returns; consider writing first to a strong local variable declared outside of the block" for the method case. |
test/Analysis/autoreleasewritechecker_test.m | ||
1 ↗ | (On Diff #139696) | Can you add a test that makes sure we don't warn on a write to an out parameter when ARC is disabled. |