diff options
| author | Miklos Vajna <vmiklos@vmiklos.hu> | 2016-05-24 19:08:53 +0000 |
|---|---|---|
| committer | Miklos Vajna <vmiklos@vmiklos.hu> | 2016-05-24 19:08:53 +0000 |
| commit | 10e25748b0ae1e26ded232f22bd1596d3a64e11c (patch) | |
| tree | 3bcd00a45a931c4b8c500870f9b48324d9b8b54e /clang-tools-extra/clang-rename/USRLocFinder.cpp | |
| parent | c8bc8821cbf1419429f955af67a8f1c3413c3d0c (diff) | |
| download | bcm5719-llvm-10e25748b0ae1e26ded232f22bd1596d3a64e11c.tar.gz bcm5719-llvm-10e25748b0ae1e26ded232f22bd1596d3a64e11c.zip | |
clang-rename: fix renaming non-members variables when referenced as macro arguments
The second check failed, FOO(C::X) wasn't renamed to FOO(C::Y).
Reviewers: klimek
Differential Revision: http://reviews.llvm.org/D20537
llvm-svn: 270599
Diffstat (limited to 'clang-tools-extra/clang-rename/USRLocFinder.cpp')
| -rw-r--r-- | clang-tools-extra/clang-rename/USRLocFinder.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-rename/USRLocFinder.cpp b/clang-tools-extra/clang-rename/USRLocFinder.cpp index d7eb6305dcc..43e9524541b 100644 --- a/clang-tools-extra/clang-rename/USRLocFinder.cpp +++ b/clang-tools-extra/clang-rename/USRLocFinder.cpp @@ -94,7 +94,9 @@ public: checkNestedNameSpecifierLoc(Expr->getQualifierLoc()); if (getUSRForDecl(Decl) == USR) { - LocationsFound.push_back(Expr->getLocation()); + const SourceManager &Manager = Decl->getASTContext().getSourceManager(); + SourceLocation Location = Manager.getSpellingLoc(Expr->getLocation()); + LocationsFound.push_back(Location); } return true; |

