]> granicus.if.org Git - clang/commit
cindex/Python: Fix cindex-{dump,includes} examples to just pass all args
authorDaniel Dunbar <daniel@zuster.org>
Sat, 13 Feb 2010 18:33:28 +0000 (18:33 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 13 Feb 2010 18:33:28 +0000 (18:33 +0000)
commit8bb44d5c86eda99c68acffacbe3ab5ca89453c9a
tree15c222841aea9e8e7b162481b0e480424aa933c6
parentef7f798c0921cde7e665935a5630578cc1065e0f
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96107 91177308-0d34-0410-b5e6-96231b3b80d8
bindings/python/examples/cindex/cindex-dump.py
bindings/python/examples/cindex/cindex-includes.py