[alpha.webkit.UncountedCallArgsChecker] Treat CFEqual as a safe function (#146369)
CFEqual is a trivial function, so treat it as safe.
This commit is contained in:
@@ -294,7 +294,7 @@ public:
|
||||
if (name == "adoptRef" || name == "getPtr" || name == "WeakPtr" ||
|
||||
name == "is" || name == "equal" || name == "hash" || name == "isType" ||
|
||||
// FIXME: Most/all of these should be implemented via attributes.
|
||||
name == "equalIgnoringASCIICase" ||
|
||||
name == "CFEqual" || name == "equalIgnoringASCIICase" ||
|
||||
name == "equalIgnoringASCIICaseCommon" ||
|
||||
name == "equalIgnoringNullity" || name == "toString")
|
||||
return true;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.UncountedCallArgsChecker -verify %s
|
||||
// expected-no-diagnostics
|
||||
|
||||
#include "objc-mock-types.h"
|
||||
|
||||
CGImageRef provideImage();
|
||||
|
||||
Boolean cfe(CFTypeRef obj)
|
||||
{
|
||||
return CFEqual(obj, provideImage());
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ CFDictionaryRef CFDictionaryCreateCopy(CFAllocatorRef allocator, CFDictionaryRef
|
||||
CFDictionaryRef CFDictionaryCreateMutableCopy(CFAllocatorRef allocator, CFIndex capacity, CFDictionaryRef theDict);
|
||||
CFIndex CFDictionaryGetCount(CFDictionaryRef theDict);
|
||||
Boolean CFDictionaryContainsKey(CFDictionaryRef theDict, const void *key);
|
||||
Boolean CFEqual(CFTypeRef, CFTypeRef);
|
||||
Boolean CFDictionaryContainsValue(CFDictionaryRef theDict, const void *value);
|
||||
const void *CFDictionaryGetValue(CFDictionaryRef theDict, const void *key);
|
||||
void CFDictionaryAddValue(CFMutableDictionaryRef theDict, const void *key, const void *value);
|
||||
|
||||
Reference in New Issue
Block a user