[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

Jacek Olesiak via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 20 03:06:39 PDT 2018


jolesiak added inline comments.


================
Comment at: lib/Format/Format.cpp:1450
     // Keep this array sorted, since we are binary searching over it.
     static constexpr llvm::StringLiteral FoundationIdentifiers[] = {
         "CGFloat",
----------------
djasper wrote:
> I have concerns about this growing lists of things. Specifically:
> - Keeping it sorted is a maintenance concern.
> - Doing binary search for basically every identifier in a header seems an unnecessary waste.
> 
> Could we just create a hash set of these?
It was a hash set initially: D42135
Changed in: D42189


Repository:
  rC Clang

https://reviews.llvm.org/D44632





More information about the cfe-commits mailing list