diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-01-19 15:59:08 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-01-19 15:59:08 +0000 |
commit | 1b07c344b4bcaacf2bc950a511283be0422c3fe8 (patch) | |
tree | f04ba612684753fee92b5d5e870ec7cbb27a63ef /clang/lib/ARCMigrate/Transforms.cpp | |
parent | d169911cc02eca4ff335589ddc61ba9e8697816f (diff) | |
download | bcm5719-llvm-1b07c344b4bcaacf2bc950a511283be0422c3fe8.tar.gz bcm5719-llvm-1b07c344b4bcaacf2bc950a511283be0422c3fe8.zip |
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.
llvm-svn: 148479
Diffstat (limited to 'clang/lib/ARCMigrate/Transforms.cpp')
-rw-r--r-- | clang/lib/ARCMigrate/Transforms.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/ARCMigrate/Transforms.cpp b/clang/lib/ARCMigrate/Transforms.cpp index 21df2578727..a64124015cf 100644 --- a/clang/lib/ARCMigrate/Transforms.cpp +++ b/clang/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()); |