aboutsummaryrefslogtreecommitdiff
path: root/lib/ARCMigrate/Transforms.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-19 15:59:08 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-19 15:59:08 +0000
commit69bda4c027671df7163619f215209529eb236620 (patch)
tree7af67df24bd01174f113df8ec7416d04527ec5d2 /lib/ARCMigrate/Transforms.cpp
parent19d5aea478b4f542e1ef7c36741e719c660bcc20 (diff)
For Lexer's isAt[Start/End]OfMacroExpansion add an out parameter for the macro
start/end location. It is commonly needed after calling the function; with this way we avoid recalculating it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ARCMigrate/Transforms.cpp')
-rw-r--r--lib/ARCMigrate/Transforms.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ARCMigrate/Transforms.cpp b/lib/ARCMigrate/Transforms.cpp
index 21df257872..a64124015c 100644
--- a/lib/ARCMigrate/Transforms.cpp
+++ b/lib/ARCMigrate/Transforms.cpp
@@ -111,9 +111,8 @@ SourceLocation trans::findSemiAfterLocation(SourceLocation loc,
ASTContext &Ctx) {
SourceManager &SM = Ctx.getSourceManager();
if (loc.isMacroID()) {
- if (!Lexer::isAtEndOfMacroExpansion(loc, SM, Ctx.getLangOptions()))
+ if (!Lexer::isAtEndOfMacroExpansion(loc, SM, Ctx.getLangOptions(), &loc))
return SourceLocation();
- loc = SM.getExpansionRange(loc).second;
}
loc = Lexer::getLocForEndOfToken(loc, /*Offset=*/0, SM, Ctx.getLangOptions());