cindex/Python: Fix cindex-{dump,includes} examples to just pass all args
directly to Index, instead of requiring the input file to be first. This makes
the examples behave more like 'clang'.
For example,
ddunbar@giles:tmp$ echo '#include <string>' | python ~/llvm/tools/clang/bindings/python/examples/cindex/cindex-includes.py -- -x c++ - | wc -l
114
ddunbar@giles:tmp$ echo '#include <stdio.h>' | python ~/llvm/tools/clang/bindings/python/examples/cindex/cindex-includes.py -- -x c - | wc -l
10
llvm-svn: 96107
diff --git a/clang/bindings/python/examples/cindex/cindex-dump.py b/clang/bindings/python/examples/cindex/cindex-dump.py
index ace4ae8..af7ddab 100644
--- a/clang/bindings/python/examples/cindex/cindex-dump.py
+++ b/clang/bindings/python/examples/cindex/cindex-dump.py
@@ -74,10 +74,8 @@
if len(args) == 0:
parser.error('invalid number arguments')
- input_path = args.pop(0)
-
index = Index.create()
- tu = index.parse(input_path, args)
+ tu = index.parse(None, args)
if not tu:
parser.error("unable to load input")