Merging r196038:
------------------------------------------------------------------------
r196038 | alp | 2013-11-30 21:08:12 -0800 (Sat, 30 Nov 2013) | 1 line

Fix a variety of user-visible and comment typos
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_34@196039 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/clang-modernize/Core/IncludeDirectives.h b/clang-modernize/Core/IncludeDirectives.h
index 51627c5..d611caf 100644
--- a/clang-modernize/Core/IncludeDirectives.h
+++ b/clang-modernize/Core/IncludeDirectives.h
@@ -114,7 +114,7 @@
   /// NewLineFlags).
   ///
   /// Source files often contain a file header (copyright, license, explanation
-  /// of the file content). An \#include should preferrably be put after this.
+  /// of the file content). An \#include should preferably be put after this.
   std::pair<unsigned, unsigned>
   findFileHeaderEndOffset(clang::FileID FID) const;
 
diff --git a/clang-modernize/Core/IncludeExcludeInfo.h b/clang-modernize/Core/IncludeExcludeInfo.h
index 9e91992..16629e6 100644
--- a/clang-modernize/Core/IncludeExcludeInfo.h
+++ b/clang-modernize/Core/IncludeExcludeInfo.h
@@ -24,7 +24,7 @@
 /// provided by the user through command line options.
 class IncludeExcludeInfo {
 public:
-  /// \brief Read and parse a comma-seperated lists of paths from
+  /// \brief Read and parse a comma-separated lists of paths from
   /// \a IncludeString and \a ExcludeString.
   ///
   /// Returns error_code::success() on successful parse of the strings or
diff --git a/clang-modernize/LoopConvert/LoopActions.cpp b/clang-modernize/LoopConvert/LoopActions.cpp
index dad3cbf..00080f0 100644
--- a/clang-modernize/LoopConvert/LoopActions.cpp
+++ b/clang-modernize/LoopConvert/LoopActions.cpp
@@ -1113,8 +1113,8 @@
           DerefByConstRef = InitPointeeType.isConstQualified();
       }
     } else {
-      // If the de-referece operator return by value then test for the canonical
-      // const qualification of the init variable type.
+      // If the dereference operator returns by value then test for the
+      // canonical const qualification of the init variable type.
       DerefByConstRef = CanonicalInitVarType.isConstQualified();
     }
   } else if (FixerKind == LFK_PseudoArray) {
diff --git a/clang-modernize/LoopConvert/LoopMatchers.cpp b/clang-modernize/LoopConvert/LoopMatchers.cpp
index 719c206..807937f 100644
--- a/clang-modernize/LoopConvert/LoopMatchers.cpp
+++ b/clang-modernize/LoopConvert/LoopMatchers.cpp
@@ -54,7 +54,7 @@
 /// \code
 ///   for (int i = 0; j < 3 + 2; ++k) { ... }
 /// \endcode
-/// The following string identifers are bound to the parts of the AST:
+/// The following string identifiers are bound to these parts of the AST:
 ///   ConditionVarName: 'j' (as a VarDecl)
 ///   ConditionBoundName: '3 + 2' (as an Expr)
 ///   InitVarName: 'i' (as a VarDecl)
@@ -262,7 +262,7 @@
   // Test that the incoming type has a record declaration that has methods
   // called 'begin' and 'end'. If the incoming type is const, then make sure
   // these methods are also marked const.
-  // 
+  //
   // FIXME: To be completely thorough this matcher should also ensure the
   // return type of begin/end is an iterator that dereferences to the same as
   // what operator[] or at() returns. Such a test isn't likely to fail except
diff --git a/clang-modernize/LoopConvert/StmtAncestor.h b/clang-modernize/LoopConvert/StmtAncestor.h
index 89937af..b6cffe8 100644
--- a/clang-modernize/LoopConvert/StmtAncestor.h
+++ b/clang-modernize/LoopConvert/StmtAncestor.h
@@ -187,8 +187,8 @@
 
 private:
   std::string Name;
-  /// GeneratedDecls keeps track of ForStmts which have been tranformed, mapping
-  /// each modified ForStmt to the variable generated in the loop.
+  /// GeneratedDecls keeps track of ForStmts which have been transformed,
+  /// mapping each modified ForStmt to the variable generated in the loop.
   const StmtGeneratedVarNameMap *GeneratedDecls;
   bool Found;
 
diff --git a/clang-modernize/PassByValue/PassByValueActions.cpp b/clang-modernize/PassByValue/PassByValueActions.cpp
index e9f98e7..36ddee5 100644
--- a/clang-modernize/PassByValue/PassByValueActions.cpp
+++ b/clang-modernize/PassByValue/PassByValueActions.cpp
@@ -74,7 +74,7 @@
   return Visitor.hasExactlyOneUsageIn(Ctor);
 }
 
-/// \brief Find all references to \p ParamDecl accross all of the
+/// \brief Find all references to \p ParamDecl across all of the
 /// redeclarations of \p Ctor.
 static void
 collectParamDecls(const CXXConstructorDecl *Ctor, const ParmVarDecl *ParamDecl,
@@ -98,7 +98,7 @@
       Result.Nodes.getNodeAs<CXXCtorInitializer>(PassByValueInitializerId);
   assert(Ctor && ParamDecl && Initializer && "Bad Callback, missing node.");
 
-  // Check this now to avoid unecessary work. The param locations are checked
+  // Check this now to avoid unnecessary work. The param locations are checked
   // later.
   if (!Owner.isFileModifiable(SM, Initializer->getSourceLocation()))
     return;
diff --git a/clang-modernize/tool/ClangModernize.cpp b/clang-modernize/tool/ClangModernize.cpp
index fc343cf..881501e 100644
--- a/clang-modernize/tool/ClangModernize.cpp
+++ b/clang-modernize/tool/ClangModernize.cpp
@@ -116,7 +116,7 @@
     "for-compilers", cl::value_desc("string"),
     cl::desc("Select transforms targeting the intersection of\n"
              "language features supported by the given compilers.\n"
-             "Takes a comma-seperated list of <compiler>-<version>.\n"
+             "Takes a comma-separated list of <compiler>-<version>.\n"
              "\t<compiler> can be any of: clang, gcc, icc, msvc\n"
              "\t<version> is <major>[.<minor>]\n"),
     cl::cat(GeneralCategory));
@@ -149,12 +149,12 @@
 /// Include/Exclude Options
 static cl::opt<std::string>
 IncludePaths("include",
-             cl::desc("Comma seperated list of paths to consider to be "
+             cl::desc("Comma-separated list of paths to consider to be "
                       "transformed"),
              cl::cat(IncludeExcludeCategory));
 
 static cl::opt<std::string>
-ExcludePaths("exclude", cl::desc("Comma seperated list of paths that can not "
+ExcludePaths("exclude", cl::desc("Comma-separated list of paths that can not "
                                  "be transformed"),
              cl::cat(IncludeExcludeCategory));
 
@@ -167,7 +167,7 @@
 static cl::opt<std::string>
 ExcludeFromFile("exclude-from", cl::value_desc("filename"),
                 cl::desc("File containing a list of paths that can not be "
-                         "transforms"),
+                         "transformed"),
                 cl::cat(IncludeExcludeCategory));
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/clang-tidy/ClangTidy.cpp b/clang-tidy/ClangTidy.cpp
index dfd37d7..223f539 100644
--- a/clang-tidy/ClangTidy.cpp
+++ b/clang-tidy/ClangTidy.cpp
@@ -83,7 +83,7 @@
 /// FIXME: Note that this inherits from \c AnalysisAction as this is the only
 /// way we can currently get to AnalysisAction::CreateASTConsumer. Ideally
 /// we'd want to build a more generic way to use \c FrontendAction based
-/// checkers in clang-tidy, but that needs some preperation work first.
+/// checkers in clang-tidy, but that needs some preparation work first.
 class ClangTidyAction : public ento::AnalysisAction {
 public:
   ClangTidyAction(StringRef CheckRegexString,
diff --git a/docs/pp-trace.rst b/docs/pp-trace.rst
index 8c7e7ab..a934174 100644
--- a/docs/pp-trace.rst
+++ b/docs/pp-trace.rst
@@ -42,7 +42,7 @@
 
 .. option:: -ignore <callback-name-list>
 
-  This option specifies a comma-seperated list of names of callbacks
+  This option specifies a comma-separated list of names of callbacks
   that shouldn't be traced.  It can be used to eliminate unwanted
   trace output.  The callback names are the name of the actual
   callback function names in the PPCallbacks class:
diff --git a/modularize/Modularize.cpp b/modularize/Modularize.cpp
index e9c2cf7..cc38723 100644
--- a/modularize/Modularize.cpp
+++ b/modularize/Modularize.cpp
@@ -753,7 +753,7 @@
   // Check for the same entity being defined in multiple places.
   for (EntityMap::iterator E = Entities.begin(), EEnd = Entities.end();
        E != EEnd; ++E) {
-    // If only one occurance, exit early.
+    // If only one occurrence, exit early.
     if (E->second.size() == 1)
       continue;
     // Clear entity locations.
@@ -771,7 +771,7 @@
     for (EntryBinArray::iterator DI = EntryBins.begin(), DE = EntryBins.end();
          DI != DE; ++DI, ++KindIndex) {
       int ECount = DI->size();
-      // If only 1 occurance, skip;
+      // If only 1 occurrence, skip;
       if (ECount <= 1)
         continue;
       LocationArray::iterator FI = DI->begin();
diff --git a/test/clang-modernize/Compilations/compilation_inc.cpp b/test/clang-modernize/Compilations/compilation_inc.cpp
index 745c3d4..3dc9c29 100644
--- a/test/clang-modernize/Compilations/compilation_inc.cpp
+++ b/test/clang-modernize/Compilations/compilation_inc.cpp
@@ -13,7 +13,7 @@
 // This test uses a compilation database
 // RUN: sed -e 's#$(path)#%/T/CompilationInc#g' %S/Inputs/compile_commands.json > %T/CompilationInc/compile_commands.json
 
-// Check that files are tranformed when -p and -include are specified.
+// Check that files are transformed when -p and -include are specified.
 // RUN: cp %S/Inputs/compilations.cpp %T/CompilationInc/a1
 // RUN: cp %S/Inputs/compilations.cpp %T/CompilationInc/a2
 // RUN: cp %S/Inputs/compilations.cpp %T/CompilationInc/a3
diff --git a/test/clang-modernize/Compilations/compilation_not_inc.cpp b/test/clang-modernize/Compilations/compilation_not_inc.cpp
index bb2dfd2..595c0b7 100644
--- a/test/clang-modernize/Compilations/compilation_not_inc.cpp
+++ b/test/clang-modernize/Compilations/compilation_not_inc.cpp
@@ -13,7 +13,7 @@
 // This test uses a compilation database
 // RUN: sed -e 's#$(path)#%/T/CompilationNotInc#g' %S/Inputs/compile_commands.json > %T/CompilationNotInc/compile_commands.json
 
-// Check that no files are tranformed when -p is specified but not -include.
+// Check that no files are transformed when -p is specified but not -include.
 // RUN: cp %S/Inputs/compilations.cpp %T/CompilationNotInc/a1
 // RUN: cp %S/Inputs/compilations.cpp %T/CompilationNotInc/a2
 // RUN: cp %S/Inputs/compilations.cpp %T/CompilationNotInc/a3
diff --git a/test/clang-modernize/Compilations/detect_from_path.cpp b/test/clang-modernize/Compilations/detect_from_path.cpp
index baf88ec..d961864 100644
--- a/test/clang-modernize/Compilations/detect_from_path.cpp
+++ b/test/clang-modernize/Compilations/detect_from_path.cpp
@@ -13,7 +13,7 @@
 // This test uses a compilation database
 // RUN: sed -e 's#$(path)#%/T/DetectFromPath#g' %S/Inputs/compile_commands.json > %T/DetectFromPath/compile_commands.json
 
-// Check that files are tranformed when -p is provided and files are specified. 
+// Check that files are transformed when -p is provided and files are specified.
 // RUN: cp %S/Inputs/compilations.cpp %T/DetectFromPath/a1
 // RUN: cp %S/Inputs/compilations.cpp %T/DetectFromPath/a2
 // RUN: cp %S/Inputs/compilations.cpp %T/DetectFromPath/a3