diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-07-26 03:03:00 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-07-26 03:03:00 +0000 |
commit | 96d3589e523a04f4ff2058a7919226ce60696ae8 (patch) | |
tree | 72fb22b8fc68a01bbea93c961ec73d4321975761 /lib | |
parent | b48f7c059e74cd5395ca542c1a96be16e42f3d80 (diff) |
Rename SourceManager (and InstantiationInfo) isMacroArgInstantiation API
to isMacroArgExpansion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Basic/SourceManager.cpp | 4 | ||||
-rw-r--r-- | lib/Frontend/TextDiagnosticPrinter.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp index 8f74e32ab2..c7de18252a 100644 --- a/lib/Basic/SourceManager.cpp +++ b/lib/Basic/SourceManager.cpp @@ -884,13 +884,13 @@ SourceManager::getExpansionRange(SourceLocation Loc) const { return Res; } -bool SourceManager::isMacroArgInstantiation(SourceLocation Loc) const { +bool SourceManager::isMacroArgExpansion(SourceLocation Loc) const { if (!Loc.isMacroID()) return false; FileID FID = getFileID(Loc); const SrcMgr::SLocEntry *E = &getSLocEntry(FID); const SrcMgr::InstantiationInfo &II = E->getInstantiation(); - return II.isMacroArgInstantiation(); + return II.isMacroArgExpansion(); } diff --git a/lib/Frontend/TextDiagnosticPrinter.cpp b/lib/Frontend/TextDiagnosticPrinter.cpp index f1659eb295..c531ddd846 100644 --- a/lib/Frontend/TextDiagnosticPrinter.cpp +++ b/lib/Frontend/TextDiagnosticPrinter.cpp @@ -300,7 +300,7 @@ static SourceLocation skipToMacroArgExpansion(const SourceManager &SM, SourceLocation StartLoc) { for (SourceLocation L = StartLoc; L.isMacroID(); L = SM.getImmediateSpellingLoc(L)) { - if (SM.isMacroArgInstantiation(L)) + if (SM.isMacroArgExpansion(L)) return L; } @@ -317,7 +317,7 @@ static SourceLocation getImmediateMacroCallerLoc(const SourceManager &SM, // When we have the location of (part of) an expanded parameter, its spelling // location points to the argument as typed into the macro call, and // therefore is used to locate the macro caller. - if (SM.isMacroArgInstantiation(Loc)) + if (SM.isMacroArgExpansion(Loc)) return SM.getImmediateSpellingLoc(Loc); // Otherwise, the caller of the macro is located where this macro is @@ -334,7 +334,7 @@ static SourceLocation getImmediateMacroCalleeLoc(const SourceManager &SM, // When we have the location of (part of) an expanded parameter, its // expansion location points to the unexpanded paramater reference within // the macro definition (or callee). - if (SM.isMacroArgInstantiation(Loc)) + if (SM.isMacroArgExpansion(Loc)) return SM.getImmediateExpansionRange(Loc).first; // Otherwise, the callee of the macro is located where this location was |