[clang-move] Fix an incorrect range for the functions whose returned value is a macro
authorHaojian Wu <hokein@google.com>
Mon, 14 Nov 2016 14:46:48 +0000 (14:46 +0000)
committerHaojian Wu <hokein@google.com>
Mon, 14 Nov 2016 14:46:48 +0000 (14:46 +0000)
commit2467539800aa1d896b5214fcc29597d7aee2f126
treef7a907309bc8743822a7fa28133cbd2037506542
parent27fed8e5d636d67ed5e2dff77705dcae1fcd0b15
[clang-move] Fix an incorrect range for the functions whose returned value is a macro

Summary:
Fix an incorrect range for the functions whose returned value is a macro
(e.g. `bool`). This incorrect range can lead to modifications of an unexpected
file where the macro is in.

We should use expansion location instead of spelling location.

Reviewers: ioeric

Subscribers: cfe-commits

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

llvm-svn: 286833
clang-tools-extra/clang-move/ClangMove.cpp
clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp