[PATCH] D21019: [include-fixer] try to make vim header selection more friendly.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 6 07:39:36 PDT 2016


hokein added inline comments.

================
Comment at: include-fixer/tool/clang-include-fixer.py:53
@@ +52,3 @@
+  except Exception:
+    if res == '':
+      # choose the top ranked header by default
----------------
We can handle the ` ` , `a`, `q` cases after `res=vim.eval(to_eval)` instead of handling them in exception block. They don't look like errors in my opinion.

================
Comment at: include-fixer/tool/clang-include-fixer.py:132
@@ +131,3 @@
+  except Exception as error:
+    print error.message
+  return
----------------
For error message, it might be better to print to stderr `print >> sys.stderr, error.message`?


http://reviews.llvm.org/D21019





More information about the cfe-commits mailing list