Index: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp @@ -361,7 +361,7 @@ return StringRef(); // Empty string. } - return Lexer::getSourceText(CharSourceRange(Range, true), SourceMgr, + return Lexer::getSourceText(CharSourceRange(Range, /*ITR=*/true), SourceMgr, LangOpts); } @@ -504,7 +504,7 @@ void LoopConvertCheck::getAliasRange(SourceManager &SM, SourceRange &Range) { bool Invalid = false; const char *TextAfter = - SM.getCharacterData(Range.getEnd().getLocWithOffset(1), &Invalid); + SM.getCharacterData(Range.getEnd().getLocWithOffset(/*Offset=*/1), &Invalid); if (Invalid) return; unsigned Offset = std::strspn(TextAfter, " \t\r\n"); Index: clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp +++ clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp @@ -190,8 +190,8 @@ return false; llvm::FoldingSetNodeID FirstID, SecondID; - First->Profile(FirstID, *Context, true); - Second->Profile(SecondID, *Context, true); + First->Profile(FirstID, *Context, /*Canonical=*/true); + Second->Profile(SecondID, *Context, /*Canonical=*/true); return FirstID == SecondID; } @@ -235,7 +235,7 @@ static bool containsExpr(ASTContext *Context, const ContainerT *Container, const Expr *E) { llvm::FoldingSetNodeID ID; - E->Profile(ID, *Context, true); + E->Profile(ID, *Context, /*Canonical=*/true); for (const auto &I : *Container) { if (ID == I.second) return true; @@ -477,7 +477,7 @@ void ForLoopIndexUseVisitor::addComponent(const Expr *E) { llvm::FoldingSetNodeID ID; const Expr *Node = E->IgnoreParenImpCasts(); - Node->Profile(ID, *Context, true); + Node->Profile(ID, *Context, /*Canonical=*/true); DependentExprs.push_back(std::make_pair(Node, ID)); } Index: clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp @@ -52,7 +52,7 @@ Options.get("MakeSmartPtrFunctionHeader", StdMemoryHeader)), MakeSmartPtrFunctionName( Options.get("MakeSmartPtrFunction", MakeSmartPtrFunctionName)), - IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", true)) {} + IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", /*Default=*/true)) {} void MakeSmartPtrCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { Options.store(Opts, "IncludeStyle", IncludeStyle); @@ -194,11 +194,11 @@ SourceRange BraceRange = Construct->getParenOrBraceRange(); Diag << FixItHint::CreateReplacement( CharSourceRange::getCharRange( - BraceRange.getBegin(), BraceRange.getBegin().getLocWithOffset(1)), + BraceRange.getBegin(), BraceRange.getBegin().getLocWithOffset(/*Offset=*/1)), "("); Diag << FixItHint::CreateReplacement( CharSourceRange::getCharRange(BraceRange.getEnd(), - BraceRange.getEnd().getLocWithOffset(1)), + BraceRange.getEnd().getLocWithOffset(/*Offset=*/1)), ")"); } @@ -382,7 +382,7 @@ // std::make_smart_ptr(5); // std::make_smart_ptr(); InitRange = SourceRange( - NewConstruct->getParenOrBraceRange().getBegin().getLocWithOffset(1), + NewConstruct->getParenOrBraceRange().getBegin().getLocWithOffset(/*Offset=*/1), NewConstruct->getParenOrBraceRange().getEnd().getLocWithOffset(-1)); } } else { @@ -410,7 +410,7 @@ Diag << FixItHint::CreateRemoval( CharSourceRange::getCharRange(NewStart, InitRange.getBegin())); Diag << FixItHint::CreateRemoval( - SourceRange(InitRange.getEnd().getLocWithOffset(1), NewEnd)); + SourceRange(InitRange.getEnd().getLocWithOffset(/*Offset=*/1), NewEnd)); break; } } Index: clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp @@ -122,7 +122,7 @@ : ClangTidyCheck(Name, Context), IncludeStyle(utils::IncludeSorter::parseIncludeStyle( Options.getLocalOrGlobal("IncludeStyle", "llvm"))), - ValuesOnly(Options.get("ValuesOnly", 0) != 0) {} + ValuesOnly(Options.get("ValuesOnly", /*Default=*/0) != 0) {} void PassByValueCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { Options.store(Opts, "IncludeStyle", @@ -219,7 +219,7 @@ // Use std::move in the initialization list. Diag << FixItHint::CreateInsertion(Initializer->getRParenLoc(), ")") << FixItHint::CreateInsertion( - Initializer->getLParenLoc().getLocWithOffset(1), "std::move("); + Initializer->getLParenLoc().getLocWithOffset(/*Offset=*/1), "std::move("); if (auto IncludeFixit = Inserter->CreateIncludeInsertion( Result.SourceManager->getFileID(Initializer->getSourceLocation()), Index: clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.cpp @@ -89,7 +89,7 @@ ClangTidyContext *Context) : ClangTidyCheck(Name, Context), DelimiterStem(Options.get("DelimiterStem", "lit")), - ReplaceShorterLiterals(Options.get("ReplaceShorterLiterals", false)) { + ReplaceShorterLiterals(Options.get("ReplaceShorterLiterals", /*Default=*/false)) { // Non-printing characters are disallowed: // \007 = \a bell // \010 = \b backspace Index: clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.cpp @@ -175,7 +175,7 @@ StringRef Diagnostic) { SourceLocation VoidLoc(VoidToken.getLocation()); auto VoidRange = - CharSourceRange::getTokenRange(VoidLoc, VoidLoc.getLocWithOffset(3)); + CharSourceRange::getTokenRange(VoidLoc, VoidLoc.getLocWithOffset(/*Offset=*/3)); diag(VoidLoc, Diagnostic) << FixItHint::CreateRemoval(VoidRange); } Index: clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp @@ -317,8 +317,8 @@ UseAutoCheck::UseAutoCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), - MinTypeNameLength(Options.get("MinTypeNameLength", 5)), - RemoveStars(Options.get("RemoveStars", 0)) {} + MinTypeNameLength(Options.get("MinTypeNameLength", /*Default=*/5)), + RemoveStars(Options.get("RemoveStars", /*Default=*/0)) {} void UseAutoCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { Options.store(Opts, "MinTypeNameLength", MinTypeNameLength); @@ -365,7 +365,7 @@ // FIXME: The following only checks if the constructor can be used // implicitly, not if it actually was. Cases where the converting // constructor was used explicitly won't get converted. - if (NestedConstruct->getConstructor()->isConvertingConstructor(false)) + if (NestedConstruct->getConstructor()->isConvertingConstructor(/*AllowExplicit=*/false)) return; } if (!Context->hasSameType(V->getType(), E->getType())) Index: clang-tools-extra/clang-tidy/modernize/UseBoolLiteralsCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/UseBoolLiteralsCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/UseBoolLiteralsCheck.cpp @@ -21,7 +21,7 @@ UseBoolLiteralsCheck::UseBoolLiteralsCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), - IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", true)) {} + IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", /*Default=*/true)) {} void UseBoolLiteralsCheck::registerMatchers(MatchFinder *Finder) { if (!getLangOpts().CPlusPlus) Index: clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp @@ -181,8 +181,8 @@ UseDefaultMemberInitCheck::UseDefaultMemberInitCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), - UseAssignment(Options.get("UseAssignment", 0) != 0), - IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", true) != 0) {} + UseAssignment(Options.get("UseAssignment", /*Default=*/0) != 0), + IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", /*Default=*/true) != 0) {} void UseDefaultMemberInitCheck::storeOptions( ClangTidyOptions::OptionMap &Opts) { Index: clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp @@ -30,7 +30,7 @@ UseEmplaceCheck::UseEmplaceCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), - IgnoreImplicitConstructors(Options.get("IgnoreImplicitConstructors", 0)), + IgnoreImplicitConstructors(Options.get("IgnoreImplicitConstructors", /*Default=*/0)), ContainersWithPushBack(utils::options::parseStringList(Options.get( "ContainersWithPushBack", DefaultContainersWithPushBack))), SmartPointers(utils::options::parseStringList( Index: clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp @@ -192,7 +192,7 @@ static bool bodyEmpty(const ASTContext *Context, const CompoundStmt *Body) { bool Invalid = false; StringRef Text = Lexer::getSourceText( - CharSourceRange::getCharRange(Body->getLBracLoc().getLocWithOffset(1), + CharSourceRange::getCharRange(Body->getLBracLoc().getLocWithOffset(/*Offset=*/1), Body->getRBracLoc()), Context->getSourceManager(), Context->getLangOpts(), &Invalid); return !Invalid && std::strspn(Text.data(), " \t\r\n") == Text.size(); @@ -201,7 +201,7 @@ UseEqualsDefaultCheck::UseEqualsDefaultCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), - IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", true) != 0) {} + IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", /*Default=*/true) != 0) {} void UseEqualsDefaultCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { Options.store(Opts, "IgnoreMacros", IgnoreMacros); Index: clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.cpp @@ -20,7 +20,7 @@ UseNoexceptCheck::UseNoexceptCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), NoexceptMacro(Options.get("ReplacementString", "")), - UseNoexceptFalse(Options.get("UseNoexceptFalse", true)) {} + UseNoexceptFalse(Options.get("UseNoexceptFalse", /*Default=*/true)) {} void UseNoexceptCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { Options.store(Opts, "ReplacementString", NoexceptMacro); Index: clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp @@ -58,7 +58,7 @@ /// Returns true if and only if a replacement was made. void replaceWithNullptr(ClangTidyCheck &Check, SourceManager &SM, SourceLocation StartLoc, SourceLocation EndLoc) { - CharSourceRange Range(SourceRange(StartLoc, EndLoc), true); + CharSourceRange Range(SourceRange(StartLoc, EndLoc), /*ITR=*/true); // Add a space if nullptr follows an alphanumeric character. This happens // whenever there is an c-style explicit cast to nullptr not surrounded by // parentheses and right beside a return statement. Index: clang-tools-extra/clang-tidy/modernize/UseTransparentFunctorsCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/UseTransparentFunctorsCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/UseTransparentFunctorsCheck.cpp @@ -19,7 +19,7 @@ UseTransparentFunctorsCheck::UseTransparentFunctorsCheck( StringRef Name, ClangTidyContext *Context) - : ClangTidyCheck(Name, Context), SafeMode(Options.get("SafeMode", 0)) {} + : ClangTidyCheck(Name, Context), SafeMode(Options.get("SafeMode", /*Default=*/0)) {} void UseTransparentFunctorsCheck::storeOptions( ClangTidyOptions::OptionMap &Opts) { Index: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp @@ -19,7 +19,7 @@ UseUsingCheck::UseUsingCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), - IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", true)) {} + IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", /*Default=*/true)) {} void UseUsingCheck::registerMatchers(MatchFinder *Finder) { if (!getLangOpts().CPlusPlus11)