我的第一个Clang插件
编写插件
//在CMakeLists.txt文件最后 add_clang_subdirectory(AnnotationPlugin)cmake -G Xcode ../llvm && open LLVM.xcodeproj
使用插件
在命令行中使用
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
@implementation ViewController
- (instancetype)init
{
if(self = [super init]){
}
return self;
}
@end在 Xcode 10 中使用插件
最终效果
Last updated
Was this helpful?




