[all-commits] [llvm/llvm-project] 73d160: [clang][Tooling] Fix `getFileRange` returning a ra...

Eric Li via All-commits all-commits at lists.llvm.org
Fri Nov 28 08:32:23 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 73d1602d0694671ac7f334635c8a5d1df0de1f0e
      https://github.com/llvm/llvm-project/commit/73d1602d0694671ac7f334635c8a5d1df0de1f0e
  Author: Eric Li <li.zhe.hua at gmail.com>
  Date:   2025-11-28 (Fri, 28 Nov 2025)

  Changed paths:
    M clang/lib/Tooling/Transformer/SourceCode.cpp
    M clang/unittests/Tooling/SourceCodeTest.cpp

  Log Message:
  -----------
  [clang][Tooling] Fix `getFileRange` returning a range spanning macro invocation (#169842)

A followup to 40991215f4aba37fd43b65d96ad0a445dcd041b2.

When the start or end token is inside a macro argument and the other is
outside of the macro, we want to reject the range for a similar reason.
The range will include half of the macro call, either the closing paren
or the macro name and open paren.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list