[PATCH] D143560: clang-format.el: fix warnings

Augustin Fabre via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 8 05:32:29 PST 2023


augfab added inline comments.


================
Comment at: clang/tools/clang-format/clang-format.el:70
           (cl-case (xml-node-name node)
-            ('replacement
+            ((replacement quote)
              (let* ((offset (xml-get-attribute-or-nil node 'offset))
----------------
phst wrote:
> what's the change here?
There is no change here, nor on line 80.
I don't understand why Phabricator highlights these two lines in red/green.
The raw diff doesn't show these two lines: https://reviews.llvm.org/file/data/u6j4564axwglt6pu42ff/PHID-FILE-fa54axif3rocku7zfmix/D143560.diff


================
Comment at: clang/tools/clang-format/clang-format.el:80
                (push (list offset length text) replacements)))
-            ('cursor
+            ((cursor quote)
              (setq cursor (string-to-number text)))))))
----------------
phst wrote:
> same here, what is being changed?
Same as above, no change, no idea why it's highlighted 😕


================
Comment at: clang/tools/clang-format/clang-format.el:85
                              (lambda (a b)
                                (or (> (car a) (car b))
                                    (and (= (car a) (car b))
----------------
phst wrote:
> The intention here is that this should be just `replacement' since I'm pretty sure we don't have XML tags like <quote>
You are right, thanks. I misunderstood what `cl-case` does.



================
Comment at: clang/tools/clang-format/clang-format.el:96
                                                  'utf-8-unix)))
     (goto-char start)
     (delete-region start end)
----------------
DavidTruby wrote:
> phst wrote:
> > same here, AIUI this should just be `quote'
> I think you mean "just cursor" here
You are right.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143560



More information about the cfe-commits mailing list