From cb8e01acd07db4bc833784d5f715b163ce9f2ce4 Mon Sep 17 00:00:00 2001 From: Faisal Vali Date: Mon, 17 Jul 2017 17:20:57 +0000 Subject: [PATCH] [NFC] Update function call names as changed in MacroInfo that should refer to Parameters (as opposed to Arguments). This syncs them up with clang commit r308190 Thanks! llvm-svn: 308191 --- clang-tools-extra/clang-tidy/misc/MacroParenthesesCheck.cpp | 2 +- .../clang-tidy/misc/MacroRepeatedSideEffectsCheck.cpp | 4 ++-- clang-tools-extra/modularize/PreprocessorTracker.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/clang-tidy/misc/MacroParenthesesCheck.cpp b/clang-tools-extra/clang-tidy/misc/MacroParenthesesCheck.cpp index dd4df1cc4acc..59fe77238288 100644 --- a/clang-tools-extra/clang-tidy/misc/MacroParenthesesCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/MacroParenthesesCheck.cpp @@ -185,7 +185,7 @@ void MacroParenthesesPPCallbacks::argument(const Token &MacroNameTok, continue; // Only interested in macro arguments. - if (MI->getArgumentNum(Tok.getIdentifierInfo()) < 0) + if (MI->getParameterNum(Tok.getIdentifierInfo()) < 0) continue; // Argument is surrounded with parentheses/squares/braces/commas. diff --git a/clang-tools-extra/clang-tidy/misc/MacroRepeatedSideEffectsCheck.cpp b/clang-tools-extra/clang-tidy/misc/MacroRepeatedSideEffectsCheck.cpp index 229ec850bf79..1bbed46b3dda 100644 --- a/clang-tools-extra/clang-tidy/misc/MacroRepeatedSideEffectsCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/MacroRepeatedSideEffectsCheck.cpp @@ -58,8 +58,8 @@ void MacroRepeatedPPCallbacks::MacroExpands(const Token &MacroNameTok, }) != MI->tokens().end()) return; - for (unsigned ArgNo = 0U; ArgNo < MI->getNumArgs(); ++ArgNo) { - const IdentifierInfo *Arg = *(MI->arg_begin() + ArgNo); + for (unsigned ArgNo = 0U; ArgNo < MI->getNumParams(); ++ArgNo) { + const IdentifierInfo *Arg = *(MI->param_begin() + ArgNo); const Token *ResultArgToks = Args->getUnexpArgument(ArgNo); if (hasSideEffects(ResultArgToks) && diff --git a/clang-tools-extra/modularize/PreprocessorTracker.cpp b/clang-tools-extra/modularize/PreprocessorTracker.cpp index 319356897b10..1df90698e26f 100644 --- a/clang-tools-extra/modularize/PreprocessorTracker.cpp +++ b/clang-tools-extra/modularize/PreprocessorTracker.cpp @@ -407,7 +407,7 @@ static std::string getMacroExpandedString(clang::Preprocessor &PP, // Walk over the macro Tokens. for (const auto &T : MI->tokens()) { clang::IdentifierInfo *II = T.getIdentifierInfo(); - int ArgNo = (II && Args ? MI->getArgumentNum(II) : -1); + int ArgNo = (II && Args ? MI->getParameterNum(II) : -1); if (ArgNo == -1) { // This isn't an argument, just add it. if (II == nullptr)