Commits

Ted Kremenek committed 09b4b957489
Get serialized diagnostics breathing. Still validating, then will add tests. $ cat test.swift This is invalid code. $ swift -serialize-diagnostics test.dia test.swift test.swift:1:1: error: expected expression This is invalid code. ^ test.swift:1:21: error: postfix '.' is reserved This is invalid code. ^ test.swift:1:22: warning: missing newline at end of file This is invalid code. ^ $ llvm-bcanalyzer -dump test.dia <BLOCKINFO_BLOCK/> <Meta NumWords=2 BlockCodeSize=3> <Version abbrevid=4 op0=1/> </Meta> <Diag NumWords=18 BlockCodeSize=4> <FileName abbrevid=8 op0=1 op1=0 op2=0 op3=10/> blob data = 'test.swift' <DiagInfo abbrevid=4 op0=3 op1=1 op2=1 op3=1 op4=0 op5=0 op6=0 op7=19/> blob data = 'expected expression' </Diag> <Diag NumWords=19 BlockCodeSize=4> <FileName abbrevid=8 op0=2 op1=0 op2=0 op3=10/> blob data = 'test.swift' <DiagInfo abbrevid=4 op0=3 op1=2 op2=1 op3=21 op4=0 op5=0 op6=0 op7=23/> blob data = 'postfix '.' is reserved' </Diag> <Diag NumWords=21 BlockCodeSize=4> <FileName abbrevid=8 op0=3 op1=0 op2=0 op3=10/> blob data = 'test.swift' <DiagInfo abbrevid=4 op0=2 op1=3 op2=1 op3=22 op4=0 op5=0 op6=0 op7=30/> blob data = 'missing newline at end of file' </Diag> Summary of test.dia: Total size: 3808b/476.00B/119W Stream type: unknown # Toplevel Blocks: 5 ... $ c-index-test -read-diagnostics test.dia test.swift:1:1: error: expected expression [] [] Number FIXITs = 0 test.swift:1:21: error: postfix '.' is reserved [] [] Number FIXITs = 0 test.swift:1:22: warning: missing newline at end of file [] [] Number FIXITs = 0 Number of diagnostics: 3 Swift SVN r5515