[PATCH] D70664: [clang-format] update string comparison in clang-format.py

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 09:37:37 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rG79f8c20e2cb6: update string comparison in clang-format.py (authored by MyDeveloperDay).

Changed prior to commit:
  https://reviews.llvm.org/D70664?vs=230873&id=232591#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70664

Files:
  clang/tools/clang-format/clang-format.py


Index: clang/tools/clang-format/clang-format.py
===================================================================
--- clang/tools/clang-format/clang-format.py
+++ clang/tools/clang-format/clang-format.py
@@ -136,7 +136,7 @@
     lines = lines[1:-1]
     sequence = difflib.SequenceMatcher(None, buf, lines)
     for op in reversed(sequence.get_opcodes()):
-      if op[0] is not 'equal':
+      if op[0] != 'equal':
         vim.current.buffer[op[1]:op[2]] = lines[op[3]:op[4]]
     if output.get('IncompleteFormat'):
       print('clang-format: incomplete (syntax errors)')


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70664.232591.patch
Type: text/x-patch
Size: 577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191206/44363039/attachment.bin>


More information about the cfe-commits mailing list