alexshap added a reviewer: Eugene.Zelenko.
alexshap removed rL LLVM as the repository for this revision.
alexshap updated this revision to Diff 68746.
alexshap added a comment.

1. clang-tidy -checks=google-explicit-constructor 
tools/clang/lib/AST/CommentSema.cpp - no other issues found
2. clang-format -i -lines 960:967 tools/clang/lib/AST/CommentSema.cpp - done


https://reviews.llvm.org/D23653

Files:
  lib/AST/CommentSema.cpp

Index: lib/AST/CommentSema.cpp
===================================================================
--- lib/AST/CommentSema.cpp
+++ lib/AST/CommentSema.cpp
@@ -950,20 +950,17 @@
 
 namespace {
 class SimpleTypoCorrector {
+  const NamedDecl *BestDecl;
   StringRef Typo;
   const unsigned MaxEditDistance;
-
-  const NamedDecl *BestDecl;
   unsigned BestEditDistance;
   unsigned BestIndex;
   unsigned NextIndex;
 
 public:
-  SimpleTypoCorrector(StringRef Typo) :
-      Typo(Typo), MaxEditDistance((Typo.size() + 2) / 3),
-      BestDecl(nullptr), BestEditDistance(MaxEditDistance + 1),
-      BestIndex(0), NextIndex(0)
-  { }
+  explicit SimpleTypoCorrector(StringRef Typo)
+      : BestDecl(nullptr), Typo(Typo), MaxEditDistance((Typo.size() + 2) / 3),
+        BestEditDistance(MaxEditDistance + 1), BestIndex(0), NextIndex(0) {}
 
   void addDecl(const NamedDecl *ND);
 


Index: lib/AST/CommentSema.cpp
===================================================================
--- lib/AST/CommentSema.cpp
+++ lib/AST/CommentSema.cpp
@@ -950,20 +950,17 @@
 
 namespace {
 class SimpleTypoCorrector {
+  const NamedDecl *BestDecl;
   StringRef Typo;
   const unsigned MaxEditDistance;
-
-  const NamedDecl *BestDecl;
   unsigned BestEditDistance;
   unsigned BestIndex;
   unsigned NextIndex;
 
 public:
-  SimpleTypoCorrector(StringRef Typo) :
-      Typo(Typo), MaxEditDistance((Typo.size() + 2) / 3),
-      BestDecl(nullptr), BestEditDistance(MaxEditDistance + 1),
-      BestIndex(0), NextIndex(0)
-  { }
+  explicit SimpleTypoCorrector(StringRef Typo)
+      : BestDecl(nullptr), Typo(Typo), MaxEditDistance((Typo.size() + 2) / 3),
+        BestEditDistance(MaxEditDistance + 1), BestIndex(0), NextIndex(0) {}
 
   void addDecl(const NamedDecl *ND);
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to