[all-commits] [llvm/llvm-project] 9841da: [clang][tooling] Fix early termination when there ...

kadir ├žetinkaya via All-commits all-commits at lists.llvm.org
Mon Jul 3 07:58:42 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9841daf27076886c6ab8e155eb812bda76f77532
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2023-07-03 (Mon, 03 Jul 2023)

  Changed paths:
    M clang-tools-extra/clangd/unittests/tweaks/AddUsingTests.cpp
    M clang/lib/Tooling/Syntax/Tokens.cpp
    M clang/unittests/Tooling/Syntax/TokensTest.cpp

  Log Message:
  [clang][tooling] Fix early termination when there are nested expansions

This also does some cleanups, I am happy to undo them (or send as
separate patches):
- Change the early exit to stop only once we hit an expansion inside the
  main file, to make sure we keep following the nested expansions.
- Add more tests to cover all the cases mentioned in the implementation
- Drop the adjustments for prev/next tokens. We do the final checks
  based on the expansion locations anyway, so any intermediate mapping
  was a no-op.

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

More information about the All-commits mailing list