[all-commits] [llvm/llvm-project] 345c48: [libTooling] Fix `getFileRangeForEdit` for inner n...
Eric Li via All-commits
all-commits at lists.llvm.org
Fri Apr 5 10:00:22 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 345c4822e4db2aa734b9f8a0b106308288ddc702
https://github.com/llvm/llvm-project/commit/345c4822e4db2aa734b9f8a0b106308288ddc702
Author: Eric Li <li.zhe.hua at gmail.com>
Date: 2024-04-05 (Fri, 05 Apr 2024)
Changed paths:
M clang/lib/Tooling/Transformer/SourceCode.cpp
M clang/unittests/Tooling/SourceCodeTest.cpp
Log Message:
-----------
[libTooling] Fix `getFileRangeForEdit` for inner nested template types (#87673)
When there is `>>` in source from the right brackets of a nested
template, the end location of the inner template points into a scratch
space with a single `>` token. This prevents the lexer from seeing the
`>>` token in the original source.
However, this causes the range to appear to be partially in a macro, and
is problematic if we are trying to avoid ranges with any macro
expansions.
This change detects these split tokens in token ranges, converting it to the
corresponding character range without the expansion.
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