llvm-project/clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-val...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
528 B
Mathematica
Raw Normal View History

// RUN: clang-tidy %s -checks=-*,performance-unnecessary-value-param -- \
// RUN: -xobjective-c -fobjc-abi-version=2 -fobjc-arc | count 0
#if !__has_feature(objc_arc)
#error Objective-C ARC not enabled as expected
#endif
// Passing an Objective-C ARC-managed object to a C function should
// not raise performance-unnecessary-value-param.
void foo(id object) { }
2020-01-04 23:28:41 +08:00
// Same for explicitly non-ARC-managed Objective-C objects.
void bar(__unsafe_unretained id object) { }
// Same for Objective-c classes.
void baz(Class c) { }