[clang-tools-extra] r308191 - [NFC] Update function call names as changed in MacroInfo that should refer to Parameters (as opposed to Arguments).
Faisal Vali via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 17 10:20:57 PDT 2017
Author: faisalv
Date: Mon Jul 17 10:20:57 2017
New Revision: 308191
URL: http://llvm.org/viewvc/llvm-project?rev=308191&view=rev
Log:
[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!
Modified:
clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.cpp
clang-tools-extra/trunk/clang-tidy/misc/MacroRepeatedSideEffectsCheck.cpp
clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
Modified: clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.cpp?rev=308191&r1=308190&r2=308191&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.cpp Mon Jul 17 10:20:57 2017
@@ -185,7 +185,7 @@ void MacroParenthesesPPCallbacks::argume
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.
Modified: clang-tools-extra/trunk/clang-tidy/misc/MacroRepeatedSideEffectsCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/MacroRepeatedSideEffectsCheck.cpp?rev=308191&r1=308190&r2=308191&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/MacroRepeatedSideEffectsCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/MacroRepeatedSideEffectsCheck.cpp Mon Jul 17 10:20:57 2017
@@ -58,8 +58,8 @@ void MacroRepeatedPPCallbacks::MacroExpa
}) != 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) &&
Modified: clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp?rev=308191&r1=308190&r2=308191&view=diff
==============================================================================
--- clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp (original)
+++ clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp Mon Jul 17 10:20:57 2017
@@ -407,7 +407,7 @@ static std::string getMacroExpandedStrin
// 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)
More information about the cfe-commits
mailing list