llvm/llvm-project

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

Open

#38.995 geöffnet am 13. Nov. 2018

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (1 zugewiesene Person)C++ (10.782 Forks)batch import
bugzillaclang-formatenhancementgood first issueobjective-c

Repository-Metriken

Stars
 (26.378 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 2h) (1.000 gemergte PRs in 30 T)

Beschreibung

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;

Contributor Guide