Skip to content
Commit b682616d authored by Michael Wyman's avatar Michael Wyman
Browse files

Clang `unused-but-set-variable` warnings should not apply to...

Clang `unused-but-set-variable` warnings should not apply to `__attribute__((objc_precise_lifetime))` Objective-C pointers

The `objc_precise_lifetime` attribute is applied to Objective-C pointers to ensure the optimizer does not prematurely release an object under Automatic Reference Counting (ARC). It is a common enough pattern to assign values to these variables but not reference them otherwise, and annotating them with `__unused` is not really correct as they are being used to ensure an object's lifetime.

Differential Revision: https://reviews.llvm.org/D120372
parent 19e37a74
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment