From: Faisal Vali Date: Fri, 29 Sep 2017 02:17:31 +0000 (+0000) Subject: [NFC] Rename variable 'Arguments' to 'Parameters' when lexing the Macro Definition. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd3ff5f109745f792f9cdaa1cf615d0551c7c37c;p=clang [NFC] Rename variable 'Arguments' to 'Parameters' when lexing the Macro Definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314483 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index 1d8056eb75..9c2860dc9c 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -2137,14 +2137,14 @@ void Preprocessor::HandleIncludeMacrosDirective(SourceLocation HashLoc, /// closing ), updating MI with what we learn. Return true if an error occurs /// parsing the arg list. bool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) { - SmallVector Arguments; + SmallVector Parameters; while (true) { LexUnexpandedToken(Tok); switch (Tok.getKind()) { case tok::r_paren: // Found the end of the argument list. - if (Arguments.empty()) // #define FOO() + if (Parameters.empty()) // #define FOO() return false; // Otherwise we have #define FOO(A,) Diag(Tok, diag::err_pp_expected_ident_in_arg_list); @@ -2168,9 +2168,9 @@ bool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) { return true; } // Add the __VA_ARGS__ identifier as an argument. - Arguments.push_back(Ident__VA_ARGS__); + Parameters.push_back(Ident__VA_ARGS__); MI->setIsC99Varargs(); - MI->setParameterList(Arguments, BP); + MI->setParameterList(Parameters, BP); return false; case tok::eod: // #define X( Diag(Tok, diag::err_pp_missing_rparen_in_macro_def); @@ -2187,14 +2187,14 @@ bool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) { // If this is already used as an argument, it is used multiple times (e.g. // #define X(A,A. - if (std::find(Arguments.begin(), Arguments.end(), II) != - Arguments.end()) { // C99 6.10.3p6 + if (std::find(Parameters.begin(), Parameters.end(), II) != + Parameters.end()) { // C99 6.10.3p6 Diag(Tok, diag::err_pp_duplicate_name_in_arg_list) << II; return true; } // Add the argument to the macro info. - Arguments.push_back(II); + Parameters.push_back(II); // Lex the token after the identifier. LexUnexpandedToken(Tok); @@ -2204,7 +2204,7 @@ bool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) { Diag(Tok, diag::err_pp_expected_comma_in_arg_list); return true; case tok::r_paren: // #define X(A) - MI->setParameterList(Arguments, BP); + MI->setParameterList(Parameters, BP); return false; case tok::comma: // #define X(A, break; @@ -2220,7 +2220,7 @@ bool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) { } MI->setIsGNUVarargs(); - MI->setParameterList(Arguments, BP); + MI->setParameterList(Parameters, BP); return false; } }