diff options
Diffstat (limited to 'clang/lib/Lex/MacroInfo.cpp')
-rw-r--r-- | clang/lib/Lex/MacroInfo.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/clang/lib/Lex/MacroInfo.cpp b/clang/lib/Lex/MacroInfo.cpp index 6dc7841bc16..1e5deeb1919 100644 --- a/clang/lib/Lex/MacroInfo.cpp +++ b/clang/lib/Lex/MacroInfo.cpp @@ -17,8 +17,8 @@ using namespace clang; MacroInfo::MacroInfo(SourceLocation DefLoc) : Location(DefLoc), - ParameterList(nullptr), - NumParameters(0), + ArgumentList(nullptr), + NumArguments(0), IsDefinitionLengthCached(false), IsFunctionLike(false), IsC99Varargs(false), @@ -74,7 +74,7 @@ bool MacroInfo::isIdenticalTo(const MacroInfo &Other, Preprocessor &PP, // Check # tokens in replacement, number of args, and various flags all match. if (ReplacementTokens.size() != Other.ReplacementTokens.size() || - getNumParams() != Other.getNumParams() || + getNumArgs() != Other.getNumArgs() || isFunctionLike() != Other.isFunctionLike() || isC99Varargs() != Other.isC99Varargs() || isGNUVarargs() != Other.isGNUVarargs()) @@ -82,8 +82,7 @@ bool MacroInfo::isIdenticalTo(const MacroInfo &Other, Preprocessor &PP, if (Lexically) { // Check arguments. - for (param_iterator I = param_begin(), OI = Other.param_begin(), - E = param_end(); + for (arg_iterator I = arg_begin(), OI = Other.arg_begin(), E = arg_end(); I != E; ++I, ++OI) if (*I != *OI) return false; } @@ -110,10 +109,10 @@ bool MacroInfo::isIdenticalTo(const MacroInfo &Other, Preprocessor &PP, return false; // With syntactic equivalence the parameter names can be different as long // as they are used in the same place. - int AArgNum = getParameterNum(A.getIdentifierInfo()); + int AArgNum = getArgumentNum(A.getIdentifierInfo()); if (AArgNum == -1) return false; - if (AArgNum != Other.getParameterNum(B.getIdentifierInfo())) + if (AArgNum != Other.getArgumentNum(B.getIdentifierInfo())) return false; continue; } @@ -142,12 +141,12 @@ LLVM_DUMP_METHOD void MacroInfo::dump() const { Out << "\n #define <macro>"; if (IsFunctionLike) { Out << "("; - for (unsigned I = 0; I != NumParameters; ++I) { + for (unsigned I = 0; I != NumArguments; ++I) { if (I) Out << ", "; - Out << ParameterList[I]->getName(); + Out << ArgumentList[I]->getName(); } if (IsC99Varargs || IsGNUVarargs) { - if (NumParameters && IsC99Varargs) Out << ", "; + if (NumArguments && IsC99Varargs) Out << ", "; Out << "..."; } Out << ")"; |