diff clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents 0572611fdcc8
children 1f2b6ac9f198
line wrap: on
line diff
--- a/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp	Tue Jun 15 19:13:43 2021 +0900
+++ b/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp	Tue Jun 15 19:15:29 2021 +0900
@@ -35,7 +35,7 @@
 
 // Looks for the token matching the predicate and returns the range of the found
 // token including trailing whitespace.
-static SourceRange FindToken(const SourceManager &Sources,
+static SourceRange findToken(const SourceManager &Sources,
                              const LangOptions &LangOpts,
                              SourceLocation StartLoc, SourceLocation EndLoc,
                              bool (*Pred)(const Token &)) {
@@ -103,17 +103,17 @@
       Ctor->getMinRequiredArguments() > 1)
     return;
 
-  bool takesInitializerList = isStdInitializerList(
+  bool TakesInitializerList = isStdInitializerList(
       Ctor->getParamDecl(0)->getType().getNonReferenceType());
   if (Ctor->isExplicit() &&
-      (Ctor->isCopyOrMoveConstructor() || takesInitializerList)) {
-    auto isKWExplicit = [](const Token &Tok) {
+      (Ctor->isCopyOrMoveConstructor() || TakesInitializerList)) {
+    auto IsKwExplicit = [](const Token &Tok) {
       return Tok.is(tok::raw_identifier) &&
              Tok.getRawIdentifier() == "explicit";
     };
     SourceRange ExplicitTokenRange =
-        FindToken(*Result.SourceManager, getLangOpts(),
-                  Ctor->getOuterLocStart(), Ctor->getEndLoc(), isKWExplicit);
+        findToken(*Result.SourceManager, getLangOpts(),
+                  Ctor->getOuterLocStart(), Ctor->getEndLoc(), IsKwExplicit);
     StringRef ConstructorDescription;
     if (Ctor->isMoveConstructor())
       ConstructorDescription = "move";
@@ -133,7 +133,7 @@
   }
 
   if (Ctor->isExplicit() || Ctor->isCopyOrMoveConstructor() ||
-      takesInitializerList)
+      TakesInitializerList)
     return;
 
   bool SingleArgument =