The array + binary_search requires the initializer list of identifiers to be
sorted. I can imagine how this list might change frequently while the support
for ObjectiveC improves (D44632). The array approach might have been a premature
optimization too, since in any case computing a hash for every token is trivial
compared to what we do for formatting it.
Details
Details
- Reviewers
bkramer djasper jolesiak benhamilton
Diff Detail
Diff Detail
- Repository
- rC Clang
- Build Status
Buildable 16275 Build 16275: arc lint + arc unit
Event Timeline
Comment Actions
I wouldn't say that this is more maintainable, but I'm not the maintainer of clang-format.
Comment Actions
One way in which DenseSet is better is that it supports StringRefs - we don't have to define hash. Seems like the lack of this override in core LLVM suggests that unordered_set is not commonly used with StringRefs.
Comment Actions
One way in which DenseSet is better is that it supports StringRefs - we don't have to define hash. Seems like the lack of this override in core LLVM suggests that unordered_set is not commonly used with StringRefs.
Makes sense, thanks.