EricWF marked 2 inline comments as done.
EricWF added inline comments.

================
Comment at: tools/clang-format/git-clang-format:323
   allowed_extensions = frozenset(allowed_extensions)
-  for filename in dictionary.keys():
+  for filename in list(dictionary.keys()):
     base_ext = filename.rsplit('.', 1)
----------------
EricWF wrote:
> kimgr wrote:
> > This should not be necessary for iteration -- in Python3 it returns a 
> > generator instead of a list, but generators can be iterated.
> This was done by the 2to3 tool. I'll have to see what it thinks it was up to. 
> But I agree this seems wrong.
Ah, so this is needed because in python 3 it's a runtime error to remove items 
from a dictionary while iterating over the keys. So we have to make a copy 
first.


https://reviews.llvm.org/D30773



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to