[PATCH] D72730: [clang-tidy] run-clang-tidy -export-fixes exports only fixes, not all warnings

Kim Gräsman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 22 23:18:59 PST 2020


kimgr added a comment.

A small Python suggestion.



================
Comment at: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py:112
+
+  if "Notes" in diag:
+    for note in diag["Notes"]:
----------------
This double lookup is unnecessary, you can do `for note in diag.get("Notes", []):` to default to empty list if "Notes" is not in diag. 


================
Comment at: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py:114
+    for note in diag["Notes"]:
+      if "Replacements" in note and note["Replacements"]:
+        return True
----------------
Same here (not sure if Replacements holds a list, but I think it might) 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72730/new/

https://reviews.llvm.org/D72730





More information about the cfe-commits mailing list