diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-04-30 05:26:07 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-04-30 05:26:07 +0000 |
commit | 94edcc63822dd231e97bc48e2177c24593ac8e61 (patch) | |
tree | 86dee75c1f48d3fb1e9ff8fd1897fe1e239412cb /clang-move | |
parent | aa3548e35fb8c3700fcd2c6a22e9200e58237773 (diff) |
Fix up after clang r331155.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@331156 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-move')
-rw-r--r-- | clang-move/ClangMove.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang-move/ClangMove.cpp b/clang-move/ClangMove.cpp index 796e3fec..d600daa2 100644 --- a/clang-move/ClangMove.cpp +++ b/clang-move/ClangMove.cpp @@ -280,7 +280,10 @@ SourceLocation getLocForEndOfDecl(const clang::Decl *D, const LangOptions &LangOpts = clang::LangOptions()) { const auto &SM = D->getASTContext().getSourceManager(); - auto EndExpansionLoc = SM.getExpansionRange(D->getLocEnd()).second; + // If the expansion range is a character range, this is the location of + // the first character past the end. Otherwise it's the location of the + // first character in the final token in the range. + auto EndExpansionLoc = SM.getExpansionRange(D->getLocEnd()).getEnd(); std::pair<FileID, unsigned> LocInfo = SM.getDecomposedLoc(EndExpansionLoc); // Try to load the file buffer. bool InvalidTemp = false; |