[PATCH] D44634: [clang-format] Detect Objective-C for #import <Foundation/Foundation.h>

Ben Hamilton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 19 09:28:37 PDT 2018


benhamilton created this revision.
benhamilton added reviewers: jolesiak, djasper.
Herald added subscribers: cfe-commits, klimek.

Previously, the Objective-C heuristic failed to detect
headers which #imported Objective-C system framework(s) and declared C
functions on top them.

This extends the heuristic to look for statements of the form:

and check if "Foo" is one of the known Objective-C system frameworks.

Test Plan: New tests added. Ran tests with:

  % make -j12 FormatTests &&
  ./tools/clang/unittests/Format/FormatTests


Repository:
  rC Clang

https://reviews.llvm.org/D44634

Files:
  lib/Format/Format.cpp
  unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44634.138953.patch
Type: text/x-patch
Size: 3972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180319/3b4373ac/attachment.bin>


More information about the cfe-commits mailing list