Skip to content

Instantly share code, notes, and snippets.

@skahack
Created September 22, 2011 16:05
Show Gist options
  • Select an option

  • Save skahack/1235168 to your computer and use it in GitHub Desktop.

Select an option

Save skahack/1235168 to your computer and use it in GitHub Desktop.
#import <Cocoa/Cocoa.h>
void applicationMain()
{
NSString *str = @"abcdefghijklmnopqrstuvwxyz";
s
str = [str stringByReplacingOccurrencesOfString:@"a" withString:@"b"];
str = [str stringByReplacingOccurrencesOfString:@"b" withString:@"c"];
}
int main(int argc, char *argv[])
{
id pool = [[NSAutoreleasePool alloc] init];
applicationMain();
[pool release];
return 0;
}
clang -cc1 -fsyntax-only -fno-caret-diagnostics -fdiagnostics-print-source-range-info -code-completion-at=test.m:6:2 test.m -x objective-c-header -fblocks -I/usr/include > out
let out = 'out'
let file = 'test.m'
let command = 'more '.out
let time = reltime()
let clang_output = vimproc#system(command)
echo "time : " . reltimestr(reltime(time))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment