llvm-project/clang/lib/ARCMigrate
Richard Smith b5f8171a1b PR37189 Fix incorrect end source location and spelling for a split '>>' token.
When a '>>' token is split into two '>' tokens (in C++11 onwards), or (as an
extension) when we do the same for other tokens starting with a '>', we can't
just use a location pointing to the first '>' as the location of the split
token, because that would result in our miscomputing the length and spelling
for the token. As a consequence, for example, a refactoring replacing 'A<X>'
with something else would sometimes replace one character too many, and
similarly diagnostics highlighting a template-id source range would highlight
one character too many.

Fix this by creating an expansion range covering the first character of the
'>>' token, whose spelling is '>'. For this to work, we generalize the
expansion range of a macro FileID to be either a token range (the common case)
or a character range (used in this new case).

llvm-svn: 331155
2018-04-30 05:25:48 +00:00
..
ARCMT.cpp Reapply "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and CodeCompleteConsumer" 2017-01-06 19:49:01 +00:00
ARCMTActions.cpp [Frontend] Make the memory management of FrontendAction pointers explicit by using unique_ptr. 2016-02-07 19:28:36 +00:00
CMakeLists.txt
FileRemapper.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 10:39:27 +00:00
Internals.h
ObjCMT.cpp Fix typos in clang 2018-04-06 15:14:32 +00:00
PlistReporter.cpp PR37189 Fix incorrect end source location and spelling for a split '>>' token. 2018-04-30 05:25:48 +00:00
TransAPIUses.cpp
TransARCAssign.cpp
TransAutoreleasePool.cpp
TransBlockObjCVariable.cpp
TransEmptyStatementsAndDealloc.cpp
TransGCAttrs.cpp PR37189 Fix incorrect end source location and spelling for a split '>>' token. 2018-04-30 05:25:48 +00:00
TransGCCalls.cpp
TransProperties.cpp
TransProtectedScope.cpp
TransRetainReleaseDealloc.cpp Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC. 2017-06-03 06:23:19 +00:00
TransUnbridgedCasts.cpp PR37189 Fix incorrect end source location and spelling for a split '>>' token. 2018-04-30 05:25:48 +00:00
TransUnusedInitDelegate.cpp
TransZeroOutPropsInDealloc.cpp
TransformActions.cpp PR37189 Fix incorrect end source location and spelling for a split '>>' token. 2018-04-30 05:25:48 +00:00
Transforms.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
Transforms.h