Commit 49dc2bd9 authored by Henrique Nakashima's avatar Henrique Nakashima Committed by Commit Bot

Enable @CheckDiscard for fields.

The annotation doc already mentions they are supported.

Verified locally that the check is triggered when an annotated field is
optimized out.

Change-Id: Ida56c91238afc2141c5562a49544a27afe9af452
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918332
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715573}
parent 22b01a6a
......@@ -15,7 +15,7 @@ import java.lang.annotation.Target;
*
* Note that @RemovableInRelease implies @CheckDiscard.
*/
@Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE})
@Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.CLASS)
public @interface CheckDiscard {
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment