llvm/llvm-project

SortIncludes should support "@import" lines in Objective-C

Open

#38,995 建立於 2018年11月13日

在 GitHub 查看
 (4 留言) (0 反應) (1 負責人)C++ (10,782 fork)batch import
bugzillaclang-formatenhancementgood first issueobjective-c

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

Bugzilla Link 39647
Version 7.0
OS MacOS X
Reporter LLVM Bugzilla Contributor

Extended Description

At the moment, SortIncludes only handles #import and #include.

In Objective-C, modules can also be imported with @​import. These are currently ignored when sorting includes, but should also be supported.

Currently with SortIncludes:

#import "b.h"
#import "c.h"
#import <d/e.h>
@import Foundation;
#import "a.h"   <- sorting stops after first non-#include line

Should be:

#import "a.h"
#import "b.h"
#import "c.h"
#import <d/e.h>
@import Foundation;

貢獻者指南