c/clang:demo common iterate
This commit is contained in:
@@ -23,7 +23,6 @@ func main() {
|
|||||||
filename := included_file.FileName()
|
filename := included_file.FileName()
|
||||||
c.Printf(c.Str("Included file: %s Include length: %d\n"), filename.CStr(), include_len)
|
c.Printf(c.Str("Included file: %s Include length: %d\n"), filename.CStr(), include_len)
|
||||||
inclusions := unsafe.Slice(inclusion_stack, include_len)
|
inclusions := unsafe.Slice(inclusion_stack, include_len)
|
||||||
if include_len > 0 {
|
|
||||||
for i := range inclusions {
|
for i := range inclusions {
|
||||||
loc := inclusions[i]
|
loc := inclusions[i]
|
||||||
var file clang.File
|
var file clang.File
|
||||||
@@ -32,6 +31,5 @@ func main() {
|
|||||||
filename = file.FileName()
|
filename = file.FileName()
|
||||||
c.Printf(c.Str(" included from: %s:%d:%d\n"), filename.CStr(), line, column)
|
c.Printf(c.Str(" included from: %s:%d:%d\n"), filename.CStr(), line, column)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, nil)
|
}, nil)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user