Bug 191036

Summary: [lldb-webkit] Last aliased enumerator in OptionSet is printed; should print first enumerator
Product: WebKit Reporter: Daniel Bates <dbates>
Component: Tools / TestsAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, kkinnunen, lforschler, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch and unit test none

Description Daniel Bates 2018-10-29 11:40:47 PDT
Consider the following enum:

enum Flag {
    A = 1 << 0,
    AAlias = A,
}

Pretty-printing OptionSet<Flag>(Flag::A) prints the last-most enumerator with value 2, AAlias. But I propose that it print the first enumerator with value 2, A, because aliased enumerators tend to be used in bounds check as opposed to actual set members.
Comment 1 Daniel Bates 2018-10-29 11:44:54 PDT
Created attachment 353304 [details]
Patch and unit test
Comment 2 Daniel Bates 2018-10-29 13:57:19 PDT
Comment on attachment 353304 [details]
Patch and unit test

Clearing flags on attachment: 353304

Committed r237564: <https://trac.webkit.org/changeset/237564>
Comment 3 Daniel Bates 2018-10-29 13:57:20 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2018-10-29 13:58:29 PDT
<rdar://problem/45648188>