[all-commits] [llvm/llvm-project] bbc2dd: [clang-tidy] Handled insertion only fixits when de...

Nathan James via All-commits all-commits at lists.llvm.org
Wed Jul 29 08:36:10 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bbc2ddecbd342d4502fe43466bd3658b89ddad7d
      https://github.com/llvm/llvm-project/commit/bbc2ddecbd342d4502fe43466bd3658b89ddad7d
  Author: Nathan James <n.james93 at hotmail.co.uk>
  Date:   2020-07-29 (Wed, 29 Jul 2020)

  Changed paths:
    M clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
    A clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-init-variables-conflict.cpp

  Log Message:
  -----------
  [clang-tidy] Handled insertion only fixits when determining conflicts.

Handle insertion fix-its when removing incompatible errors by introducting a new EventType `ET_Insert`
This has lower prioirty than End events, but higher than begin.
Idea being If an insert is at the same place as a begin event, the insert should be processed first to reduce unnecessary conflicts.
Likewise if its at the same place as an end event, process the end event first for the same reason.

This also fixes https://bugs.llvm.org/show_bug.cgi?id=46511.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D82898




More information about the All-commits mailing list