From 9ec9eb8f9aeea33a2321dc2e53985ad840e60a42 Mon Sep 17 00:00:00 2001
From: Alp Toker <alp@nuanti.com>
Date: Mon, 5 May 2014 04:39:18 +0000
Subject: [PATCH] Fix cindex-dump.py --show-ids

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bindings/python/examples/cindex/cindex-dump.py b/bindings/python/examples/cindex/cindex-dump.py
index af7ddab6ea5..99d03906c52 100644
--- a/bindings/python/examples/cindex/cindex-dump.py
+++ b/bindings/python/examples/cindex/cindex-dump.py
@@ -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)
-- 
GitLab