https://llvm.org/bugs/show_bug.cgi?id=25259
Bug ID: 25259
Summary: Objective-C compiler and static analyzer fail to warn
about properties to objc-object that are 'assign'
instead of 'weak' / 'strong'
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
i just lost 3 hours in a complicated debug session because one of the
properties in my project was assign:
@property (nonatomic, assign) NSArray *fontFamilyNames;
instead of strong:
@property (nonatomic, strong) NSArray *fontFamilyNames;
since the object was used in cocoa bindings but actually deallocated this
resulted in a strange crash somewhere deep inside Apple's frameworks, and only
'malloc_history' was able to show the culprit.
i can not understand why no warning was triggered, despite using -Wall
-Weverything and running the static analyzer
using Apple LLVM version 7.0.0 (clang-700.0.72)
i'm not the only one wishing this would result in a warning:
http://stackoverflow.com/questions/31880445/xcode-warning-if-using-assign-attribute-for-reference-types-objects
i guess not only assign but 'unsafe unretained' should also warn
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs