llvm/llvm-project

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

Open

#38.995 aperta il 13 nov 2018

Vedi su GitHub
 (4 commenti) (0 reazioni) (1 assegnatario)C++ (10.782 fork)batch import
bugzillaclang-formatenhancementgood first issueobjective-c

Metriche repository

Star
 (26.378 star)
Metriche merge PR
 (Merge medio 1g 2h) (1000 PR mergiate in 30 g)

Descrizione

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;

Guida contributor