Changeset 133793 in webkit
- Timestamp:
- Nov 7, 2012 12:35:27 PM (11 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r133731 r133793 1 2012-11-07 Remy Demarest <rdemarest@apple.com> 2 3 Function adoptNS and adoptCF should not generate memory leak diagnostic with Clang Static Analyzer. 4 https://bugs.webkit.org/show_bug.cgi?id=101420 5 6 Reviewed by Benjamin Poulain. 7 8 Add attributes to the adoptNS and adoptCF function arguments to remove Clang Static Analyzer diagnotics. 9 Define CF_RELEASES_ARGUMENT and NS_RELEASES_ARGUMENT if not available, use them in function declarations. 10 11 * wtf/RetainPtr.h: 12 (WTF::adoptCF): Adds CF_RELEASES_ARGUMENT attribute to the argument. 13 (WTF::adoptNS): Adds NS_RELEASES_ARGUMENT attribute to the argument. 14 1 15 2012-11-07 Christophe Dumez <christophe.dumez@intel.com> 2 16 -
trunk/Source/WTF/wtf/RetainPtr.h
r132711 r133793 35 35 #endif 36 36 37 #ifndef CF_RELEASES_ARGUMENT 38 #define CF_RELEASES_ARGUMENT 39 #endif 40 41 #ifndef NS_RELEASES_ARGUMENT 42 #define NS_RELEASES_ARGUMENT 43 #endif 44 37 45 namespace WTF { 38 46 … … 258 266 } 259 267 260 template<typename T> inline RetainPtr<T> adoptCF(T ) WARN_UNUSED_RETURN;268 template<typename T> inline RetainPtr<T> adoptCF(T CF_RELEASES_ARGUMENT) WARN_UNUSED_RETURN; 261 269 template<typename T> inline RetainPtr<T> adoptCF(T o) 262 270 { … … 264 272 } 265 273 266 template<typename T> inline RetainPtr<T> adoptNS(T ) WARN_UNUSED_RETURN;274 template<typename T> inline RetainPtr<T> adoptNS(T NS_RELEASES_ARGUMENT) WARN_UNUSED_RETURN; 267 275 template<typename T> inline RetainPtr<T> adoptNS(T o) 268 276 {
Note: See TracChangeset
for help on using the changeset viewer.