]> granicus.if.org Git - clang/commitdiff
Fix cindex-dump.py --show-ids
authorAlp Toker <alp@nuanti.com>
Mon, 5 May 2014 04:39:18 +0000 (04:39 +0000)
committerAlp Toker <alp@nuanti.com>
Mon, 5 May 2014 04:39:18 +0000 (04:39 +0000)
This option flag was incorrectly expecting an argument:

$ cindex-dump.py --show-ids test.cpp
cindex-dump.py: error: invalid number arguments

With this change the feature correctly gets enabled by --show-ids.

No tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207946 91177308-0d34-0410-b5e6-96231b3b80d8

bindings/python/examples/cindex/cindex-dump.py

index af7ddab6ea535f5147697f6ff674a0a53d7a9ac2..99d03906c52665ea8fa5e38e3e2720ead52d8257 100644 (file)
@@ -64,7 +64,7 @@ def main():
     parser = OptionParser("usage: %prog [options] {filename} [clang-args*]")
     parser.add_option("", "--show-ids", dest="showIDs",
                       help="Don't compute cursor IDs (very slow)",
-                      default=False)
+                      action="store_true", default=False)
     parser.add_option("", "--max-depth", dest="maxDepth",
                       help="Limit cursor expansion to depth N",
                       metavar="N", type=int, default=None)