Quellcode durchsuchen

Misc typos fixes in ./lib folder

Summary: Found via `codespell -q 3 -I ../clang-whitelist.txt -L uint,importd,crasher,gonna,cant,ue,ons,orign,ned`

Reviewers: teemperor

Reviewed By: teemperor

Subscribers: teemperor, jholewinski, jvesely, nhaehnle, whisperity, jfb, cfe-commits

Differential Revision: https://reviews.llvm.org/D55475

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348755 91177308-0d34-0410-b5e6-96231b3b80d8
Raphael Isemann vor 6 Jahren
Ursprung
Commit
9db9051461
52 geänderte Dateien mit 81 neuen und 81 gelöschten Zeilen
  1. 1 1
      lib/ARCMigrate/FileRemapper.cpp
  2. 1 1
      lib/AST/ASTContext.cpp
  3. 1 1
      lib/AST/ASTStructuralEquivalence.cpp
  4. 3 3
      lib/AST/ExprConstant.cpp
  5. 1 1
      lib/AST/ODRHash.cpp
  6. 1 1
      lib/AST/RawCommentList.cpp
  7. 1 1
      lib/Analysis/CloneDetection.cpp
  8. 1 1
      lib/CodeGen/BackendUtil.cpp
  9. 1 1
      lib/CodeGen/CGBlocks.cpp
  10. 6 6
      lib/CodeGen/CGBuiltin.cpp
  11. 1 1
      lib/CodeGen/CGDebugInfo.h
  12. 1 1
      lib/CodeGen/CGObjC.cpp
  13. 1 1
      lib/CodeGen/CGOpenMPRuntime.h
  14. 1 1
      lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  15. 3 3
      lib/CodeGen/CGStmtOpenMP.cpp
  16. 1 1
      lib/Driver/Driver.cpp
  17. 1 1
      lib/Driver/ToolChain.cpp
  18. 1 1
      lib/Driver/ToolChains/AMDGPU.cpp
  19. 1 1
      lib/Driver/ToolChains/Darwin.cpp
  20. 1 1
      lib/Driver/ToolChains/Hexagon.cpp
  21. 3 3
      lib/Frontend/CompilerInvocation.cpp
  22. 1 1
      lib/Lex/Lexer.cpp
  23. 2 2
      lib/Lex/PPDirectives.cpp
  24. 1 1
      lib/Lex/Preprocessor.cpp
  25. 1 1
      lib/Parse/Parser.cpp
  26. 2 2
      lib/Rewrite/RewriteRope.cpp
  27. 1 1
      lib/Sema/Sema.cpp
  28. 1 1
      lib/Sema/SemaChecking.cpp
  29. 3 3
      lib/Sema/SemaDecl.cpp
  30. 3 3
      lib/Sema/SemaDeclCXX.cpp
  31. 1 1
      lib/Sema/SemaDeclObjC.cpp
  32. 1 1
      lib/Sema/SemaInit.cpp
  33. 2 2
      lib/Sema/SemaLookup.cpp
  34. 1 1
      lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
  35. 1 1
      lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
  36. 1 1
      lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp
  37. 1 1
      lib/StaticAnalyzer/Checkers/CloneChecker.cpp
  38. 2 2
      lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
  39. 1 1
      lib/StaticAnalyzer/Checkers/MallocChecker.cpp
  40. 1 1
      lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
  41. 1 1
      lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp
  42. 1 1
      lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
  43. 3 3
      lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h
  44. 1 1
      lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
  45. 1 1
      lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp
  46. 1 1
      lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
  47. 1 1
      lib/StaticAnalyzer/Core/BugReporter.cpp
  48. 2 2
      lib/StaticAnalyzer/Core/ExprEngine.cpp
  49. 3 3
      lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
  50. 1 1
      lib/StaticAnalyzer/Core/Store.cpp
  51. 1 1
      lib/StaticAnalyzer/Core/WorkList.cpp
  52. 6 6
      lib/StaticAnalyzer/README.txt

+ 1 - 1
lib/ARCMigrate/FileRemapper.cpp

@@ -226,7 +226,7 @@ void FileRemapper::remap(const FileEntry *file, const FileEntry *newfile) {
 
 
 const FileEntry *FileRemapper::getOriginalFile(StringRef filePath) {
 const FileEntry *FileRemapper::getOriginalFile(StringRef filePath) {
   const FileEntry *file = FileMgr->getFile(filePath);
   const FileEntry *file = FileMgr->getFile(filePath);
-  // If we are updating a file that overriden an original file,
+  // If we are updating a file that overridden an original file,
   // actually update the original file.
   // actually update the original file.
   llvm::DenseMap<const FileEntry *, const FileEntry *>::iterator
   llvm::DenseMap<const FileEntry *, const FileEntry *>::iterator
     I = ToFromMappings.find(file);
     I = ToFromMappings.find(file);

+ 1 - 1
lib/AST/ASTContext.cpp

@@ -8129,7 +8129,7 @@ void getIntersectionOfProtocols(ASTContext &Context,
   // Also add the protocols associated with the LHS interface.
   // Also add the protocols associated with the LHS interface.
   Context.CollectInheritedProtocols(LHS->getInterface(), LHSProtocolSet);
   Context.CollectInheritedProtocols(LHS->getInterface(), LHSProtocolSet);
 
 
-  // Add all of the protocls for the RHS.
+  // Add all of the protocols for the RHS.
   llvm::SmallPtrSet<ObjCProtocolDecl *, 8> RHSProtocolSet;
   llvm::SmallPtrSet<ObjCProtocolDecl *, 8> RHSProtocolSet;
 
 
   // Start with the protocol qualifiers.
   // Start with the protocol qualifiers.

+ 1 - 1
lib/AST/ASTStructuralEquivalence.cpp

@@ -911,7 +911,7 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
   return true;
   return true;
 }
 }
 
 
-/// Determine structural equivalence of two methodss.
+/// Determine structural equivalence of two methods.
 static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
 static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
                                      CXXMethodDecl *Method1,
                                      CXXMethodDecl *Method1,
                                      CXXMethodDecl *Method2) {
                                      CXXMethodDecl *Method2) {

+ 3 - 3
lib/AST/ExprConstant.cpp

@@ -507,7 +507,7 @@ namespace {
     }
     }
 
 
     // FIXME: Adding this to every 'CallStackFrame' may have a nontrivial impact
     // FIXME: Adding this to every 'CallStackFrame' may have a nontrivial impact
-    // on the overall stack usage of deeply-recursing constexpr evaluataions.
+    // on the overall stack usage of deeply-recursing constexpr evaluations.
     // (We should cache this map rather than recomputing it repeatedly.)
     // (We should cache this map rather than recomputing it repeatedly.)
     // But let's try this and see how it goes; we can look into caching the map
     // But let's try this and see how it goes; we can look into caching the map
     // as a later change.
     // as a later change.
@@ -10315,7 +10315,7 @@ bool ComplexExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {
   case BO_Mul:
   case BO_Mul:
     if (Result.isComplexFloat()) {
     if (Result.isComplexFloat()) {
       // This is an implementation of complex multiplication according to the
       // This is an implementation of complex multiplication according to the
-      // constraints laid out in C11 Annex G. The implemention uses the
+      // constraints laid out in C11 Annex G. The implementation uses the
       // following naming scheme:
       // following naming scheme:
       //   (a + ib) * (c + id)
       //   (a + ib) * (c + id)
       ComplexValue LHS = Result;
       ComplexValue LHS = Result;
@@ -10396,7 +10396,7 @@ bool ComplexExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {
   case BO_Div:
   case BO_Div:
     if (Result.isComplexFloat()) {
     if (Result.isComplexFloat()) {
       // This is an implementation of complex division according to the
       // This is an implementation of complex division according to the
-      // constraints laid out in C11 Annex G. The implemention uses the
+      // constraints laid out in C11 Annex G. The implementation uses the
       // following naming scheme:
       // following naming scheme:
       //   (a + ib) / (c + id)
       //   (a + ib) / (c + id)
       ComplexValue LHS = Result;
       ComplexValue LHS = Result;

+ 1 - 1
lib/AST/ODRHash.cpp

@@ -49,7 +49,7 @@ void ODRHash::AddDeclarationNameImpl(DeclarationName Name) {
   auto Result = DeclNameMap.insert(std::make_pair(Name, DeclNameMap.size()));
   auto Result = DeclNameMap.insert(std::make_pair(Name, DeclNameMap.size()));
   ID.AddInteger(Result.first->second);
   ID.AddInteger(Result.first->second);
   if (!Result.second) {
   if (!Result.second) {
-    // If found in map, the the DeclarationName has previously been processed.
+    // If found in map, the DeclarationName has previously been processed.
     return;
     return;
   }
   }
 
 

+ 1 - 1
lib/AST/RawCommentList.cpp

@@ -415,7 +415,7 @@ std::string RawComment::getFormattedText(const SourceManager &SourceMgr,
       Str.pop_back();
       Str.pop_back();
   };
   };
 
 
-  // Proces first line separately to remember indent for the following lines.
+  // Process first line separately to remember indent for the following lines.
   if (!LexLine(/*IsFirstLine=*/true)) {
   if (!LexLine(/*IsFirstLine=*/true)) {
     DropTrailingNewLines(Result);
     DropTrailingNewLines(Result);
     return Result;
     return Result;

+ 1 - 1
lib/Analysis/CloneDetection.cpp

@@ -7,7 +7,7 @@
 //
 //
 //===----------------------------------------------------------------------===//
 //===----------------------------------------------------------------------===//
 ///
 ///
-///  This file implements classes for searching and anlyzing source code clones.
+/// This file implements classes for searching and analyzing source code clones.
 ///
 ///
 //===----------------------------------------------------------------------===//
 //===----------------------------------------------------------------------===//
 
 

+ 1 - 1
lib/CodeGen/BackendUtil.cpp

@@ -431,7 +431,7 @@ static void initTargetOptions(llvm::TargetOptions &Options,
   switch (LangOpts.getDefaultFPContractMode()) {
   switch (LangOpts.getDefaultFPContractMode()) {
   case LangOptions::FPC_Off:
   case LangOptions::FPC_Off:
     // Preserve any contraction performed by the front-end.  (Strict performs
     // Preserve any contraction performed by the front-end.  (Strict performs
-    // splitting of the muladd instrinsic in the backend.)
+    // splitting of the muladd intrinsic in the backend.)
     Options.AllowFPOpFusion = llvm::FPOpFusion::Standard;
     Options.AllowFPOpFusion = llvm::FPOpFusion::Standard;
     break;
     break;
   case LangOptions::FPC_On:
   case LangOptions::FPC_On:

+ 1 - 1
lib/CodeGen/CGBlocks.cpp

@@ -175,7 +175,7 @@ static std::string getBlockDescriptorName(const CGBlockInfo &BlockInfo,
 ///   unsigned long reserved;
 ///   unsigned long reserved;
 ///   unsigned long size;  // size of Block_literal metadata in bytes.
 ///   unsigned long size;  // size of Block_literal metadata in bytes.
 ///   void *copy_func_helper_decl;  // optional copy helper.
 ///   void *copy_func_helper_decl;  // optional copy helper.
-///   void *destroy_func_decl; // optioanl destructor helper.
+///   void *destroy_func_decl; // optional destructor helper.
 ///   void *block_method_encoding_address; // @encode for block literal signature.
 ///   void *block_method_encoding_address; // @encode for block literal signature.
 ///   void *block_layout_info; // encoding of captured block variables.
 ///   void *block_layout_info; // encoding of captured block variables.
 /// };
 /// };

+ 6 - 6
lib/CodeGen/CGBuiltin.cpp

@@ -93,7 +93,7 @@ static Value *EmitFromInt(CodeGenFunction &CGF, llvm::Value *V,
   return V;
   return V;
 }
 }
 
 
-/// Utility to insert an atomic instruction based on Instrinsic::ID
+/// Utility to insert an atomic instruction based on Intrinsic::ID
 /// and the expression node.
 /// and the expression node.
 static Value *MakeBinaryAtomicValue(
 static Value *MakeBinaryAtomicValue(
     CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const CallExpr *E,
     CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const CallExpr *E,
@@ -151,7 +151,7 @@ static RValue EmitBinaryAtomic(CodeGenFunction &CGF,
   return RValue::get(MakeBinaryAtomicValue(CGF, Kind, E));
   return RValue::get(MakeBinaryAtomicValue(CGF, Kind, E));
 }
 }
 
 
-/// Utility to insert an atomic instruction based Instrinsic::ID and
+/// Utility to insert an atomic instruction based Intrinsic::ID and
 /// the expression node, where the return value is the result of the
 /// the expression node, where the return value is the result of the
 /// operation.
 /// operation.
 static RValue EmitBinaryAtomicPost(CodeGenFunction &CGF,
 static RValue EmitBinaryAtomicPost(CodeGenFunction &CGF,
@@ -554,7 +554,7 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type,
 }
 }
 
 
 namespace {
 namespace {
-/// A struct to generically desribe a bit test intrinsic.
+/// A struct to generically describe a bit test intrinsic.
 struct BitTest {
 struct BitTest {
   enum ActionKind : uint8_t { TestOnly, Complement, Reset, Set };
   enum ActionKind : uint8_t { TestOnly, Complement, Reset, Set };
   enum InterlockingKind : uint8_t {
   enum InterlockingKind : uint8_t {
@@ -9429,7 +9429,7 @@ static Value *EmitX86AddSubSatExpr(CodeGenFunction &CGF, const CallExpr *E,
   Value *Res;
   Value *Res;
   if (IsAddition) {
   if (IsAddition) {
     // ADDUS: a > (a+b) ? ~0 : (a+b)
     // ADDUS: a > (a+b) ? ~0 : (a+b)
-    // If Ops[0] > Add, overflow occured.
+    // If Ops[0] > Add, overflow occurred.
     Value *Add = CGF.Builder.CreateAdd(Ops[0], Ops[1]);
     Value *Add = CGF.Builder.CreateAdd(Ops[0], Ops[1]);
     Value *ICmp = CGF.Builder.CreateICmp(ICmpInst::ICMP_UGT, Ops[0], Add);
     Value *ICmp = CGF.Builder.CreateICmp(ICmpInst::ICMP_UGT, Ops[0], Add);
     Value *Max = llvm::Constant::getAllOnesValue(ResultType);
     Value *Max = llvm::Constant::getAllOnesValue(ResultType);
@@ -12186,7 +12186,7 @@ Value *CodeGenFunction::EmitSystemZBuiltinExpr(unsigned BuiltinID,
     return Builder.CreateCall(F, {X, Y, M4Value});
     return Builder.CreateCall(F, {X, Y, M4Value});
   }
   }
 
 
-  // Vector intrisincs that output the post-instruction CC value.
+  // Vector intrinsics that output the post-instruction CC value.
 
 
 #define INTRINSIC_WITH_CC(NAME) \
 #define INTRINSIC_WITH_CC(NAME) \
     case SystemZ::BI__builtin_##NAME: \
     case SystemZ::BI__builtin_##NAME: \
@@ -12646,7 +12646,7 @@ Value *CodeGenFunction::EmitNVPTXBuiltinExpr(unsigned BuiltinID,
     bool isColMajor = isColMajorArg.getSExtValue();
     bool isColMajor = isColMajorArg.getSExtValue();
     unsigned IID;
     unsigned IID;
     unsigned NumResults = 8;
     unsigned NumResults = 8;
-    // PTX Instructions (and LLVM instrinsics) are defined for slice _d_, yet
+    // PTX Instructions (and LLVM intrinsics) are defined for slice _d_, yet
     // for some reason nvcc builtins use _c_.
     // for some reason nvcc builtins use _c_.
     switch (BuiltinID) {
     switch (BuiltinID) {
     case NVPTX::BI__hmma_m16n16k16_st_c_f16:
     case NVPTX::BI__hmma_m16n16k16_st_c_f16:

+ 1 - 1
lib/CodeGen/CGDebugInfo.h

@@ -740,7 +740,7 @@ public:
   /// function \p InlinedFn. The current debug location becomes the inlined call
   /// function \p InlinedFn. The current debug location becomes the inlined call
   /// site of the inlined function.
   /// site of the inlined function.
   ApplyInlineDebugLocation(CodeGenFunction &CGF, GlobalDecl InlinedFn);
   ApplyInlineDebugLocation(CodeGenFunction &CGF, GlobalDecl InlinedFn);
-  /// Restore everything back to the orginial state.
+  /// Restore everything back to the original state.
   ~ApplyInlineDebugLocation();
   ~ApplyInlineDebugLocation();
 };
 };
 
 

+ 1 - 1
lib/CodeGen/CGObjC.cpp

@@ -624,7 +624,7 @@ static llvm::Value *emitARCRetainLoadOfScalar(CodeGenFunction &CGF,
                                               LValue lvalue, QualType type);
                                               LValue lvalue, QualType type);
 
 
 /// Generate an Objective-C method.  An Objective-C method is a C function with
 /// Generate an Objective-C method.  An Objective-C method is a C function with
-/// its pointer, name, and types registered in the class struture.
+/// its pointer, name, and types registered in the class structure.
 void CodeGenFunction::GenerateObjCMethod(const ObjCMethodDecl *OMD) {
 void CodeGenFunction::GenerateObjCMethod(const ObjCMethodDecl *OMD) {
   StartObjCMethod(OMD, OMD->getClassInterface());
   StartObjCMethod(OMD, OMD->getClassInterface());
   PGO.assignRegionCounters(GlobalDecl(OMD), CurFn);
   PGO.assignRegionCounters(GlobalDecl(OMD), CurFn);

+ 1 - 1
lib/CodeGen/CGOpenMPRuntime.h

@@ -1557,7 +1557,7 @@ public:
   virtual Address getAddressOfLocalVariable(CodeGenFunction &CGF,
   virtual Address getAddressOfLocalVariable(CodeGenFunction &CGF,
                                             const VarDecl *VD);
                                             const VarDecl *VD);
 
 
-  /// Marks the declaration as alread emitted for the device code and returns
+  /// Marks the declaration as already emitted for the device code and returns
   /// true, if it was marked already, and false, otherwise.
   /// true, if it was marked already, and false, otherwise.
   bool markAsGlobalTarget(GlobalDecl GD);
   bool markAsGlobalTarget(GlobalDecl GD);
 
 

+ 1 - 1
lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp

@@ -2524,7 +2524,7 @@ void CGOpenMPRuntimeNVPTX::emitNonSPMDParallelCall(
     // passed from the outside of the target region.
     // passed from the outside of the target region.
     CodeGenFunction::OMPPrivateScope PrivateArgScope(CGF);
     CodeGenFunction::OMPPrivateScope PrivateArgScope(CGF);
 
 
-    // There's somehting to share.
+    // There's something to share.
     if (!CapturedVars.empty()) {
     if (!CapturedVars.empty()) {
       // Prepare for parallel region. Indicate the outlined function.
       // Prepare for parallel region. Indicate the outlined function.
       Address SharedArgs =
       Address SharedArgs =

+ 3 - 3
lib/CodeGen/CGStmtOpenMP.cpp

@@ -2955,7 +2955,7 @@ void CodeGenFunction::EmitOMPTaskBasedDirective(
         RedCG.emitAggregateType(CGF, Cnt);
         RedCG.emitAggregateType(CGF, Cnt);
         // FIXME: This must removed once the runtime library is fixed.
         // FIXME: This must removed once the runtime library is fixed.
         // Emit required threadprivate variables for
         // Emit required threadprivate variables for
-        // initilizer/combiner/finalizer.
+        // initializer/combiner/finalizer.
         CGF.CGM.getOpenMPRuntime().emitTaskReductionFixups(CGF, S.getBeginLoc(),
         CGF.CGM.getOpenMPRuntime().emitTaskReductionFixups(CGF, S.getBeginLoc(),
                                                            RedCG, Cnt);
                                                            RedCG, Cnt);
         Address Replacement = CGF.CGM.getOpenMPRuntime().getTaskReductionItem(
         Address Replacement = CGF.CGM.getOpenMPRuntime().getTaskReductionItem(
@@ -3001,10 +3001,10 @@ void CodeGenFunction::EmitOMPTaskBasedDirective(
         RedCG.emitSharedLValue(CGF, Cnt);
         RedCG.emitSharedLValue(CGF, Cnt);
         RedCG.emitAggregateType(CGF, Cnt);
         RedCG.emitAggregateType(CGF, Cnt);
         // The taskgroup descriptor variable is always implicit firstprivate and
         // The taskgroup descriptor variable is always implicit firstprivate and
-        // privatized already during procoessing of the firstprivates.
+        // privatized already during processing of the firstprivates.
         // FIXME: This must removed once the runtime library is fixed.
         // FIXME: This must removed once the runtime library is fixed.
         // Emit required threadprivate variables for
         // Emit required threadprivate variables for
-        // initilizer/combiner/finalizer.
+        // initializer/combiner/finalizer.
         CGF.CGM.getOpenMPRuntime().emitTaskReductionFixups(CGF, S.getBeginLoc(),
         CGF.CGM.getOpenMPRuntime().emitTaskReductionFixups(CGF, S.getBeginLoc(),
                                                            RedCG, Cnt);
                                                            RedCG, Cnt);
         llvm::Value *ReductionsPtr =
         llvm::Value *ReductionsPtr =

+ 1 - 1
lib/Driver/Driver.cpp

@@ -4354,7 +4354,7 @@ const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA,
 }
 }
 
 
 std::string Driver::GetFilePath(StringRef Name, const ToolChain &TC) const {
 std::string Driver::GetFilePath(StringRef Name, const ToolChain &TC) const {
-  // Seach for Name in a list of paths.
+  // Search for Name in a list of paths.
   auto SearchPaths = [&](const llvm::SmallVectorImpl<std::string> &P)
   auto SearchPaths = [&](const llvm::SmallVectorImpl<std::string> &P)
       -> llvm::Optional<std::string> {
       -> llvm::Optional<std::string> {
     // Respect a limited subset of the '-Bprefix' functionality in GCC by
     // Respect a limited subset of the '-Bprefix' functionality in GCC by

+ 1 - 1
lib/Driver/ToolChain.cpp

@@ -604,7 +604,7 @@ std::string ToolChain::ComputeLLVMTriple(const ArgList &Args,
 
 
     // Check to see if an explicit choice to use thumb has been made via
     // Check to see if an explicit choice to use thumb has been made via
     // -mthumb. For assembler files we must check for -mthumb in the options
     // -mthumb. For assembler files we must check for -mthumb in the options
-    // passed to the assember via -Wa or -Xassembler.
+    // passed to the assembler via -Wa or -Xassembler.
     bool IsThumb = false;
     bool IsThumb = false;
     if (InputType != types::TY_PP_Asm)
     if (InputType != types::TY_PP_Asm)
       IsThumb = Args.hasFlag(options::OPT_mthumb, options::OPT_mno_thumb,
       IsThumb = Args.hasFlag(options::OPT_mthumb, options::OPT_mno_thumb,

+ 1 - 1
lib/Driver/ToolChains/AMDGPU.cpp

@@ -104,7 +104,7 @@ void AMDGPUToolChain::addClangTargetOptions(
     llvm::opt::ArgStringList &CC1Args,
     llvm::opt::ArgStringList &CC1Args,
     Action::OffloadKind DeviceOffloadingKind) const {
     Action::OffloadKind DeviceOffloadingKind) const {
   // Default to "hidden" visibility, as object level linking will not be
   // Default to "hidden" visibility, as object level linking will not be
-  // supported for the forseeable future.
+  // supported for the foreseeable future.
   if (!DriverArgs.hasArg(options::OPT_fvisibility_EQ,
   if (!DriverArgs.hasArg(options::OPT_fvisibility_EQ,
                          options::OPT_fvisibility_ms_compat)) {
                          options::OPT_fvisibility_ms_compat)) {
     CC1Args.push_back("-fvisibility");
     CC1Args.push_back("-fvisibility");

+ 1 - 1
lib/Driver/ToolChains/Darwin.cpp

@@ -98,7 +98,7 @@ void darwin::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
     SourceAction = SourceAction->getInputs()[0];
     SourceAction = SourceAction->getInputs()[0];
   }
   }
 
 
-  // If -fno-integrated-as is used add -Q to the darwin assember driver to make
+  // If -fno-integrated-as is used add -Q to the darwin assembler driver to make
   // sure it runs its system assembler not clang's integrated assembler.
   // sure it runs its system assembler not clang's integrated assembler.
   // Applicable to darwin11+ and Xcode 4+.  darwin<10 lacked integrated-as.
   // Applicable to darwin11+ and Xcode 4+.  darwin<10 lacked integrated-as.
   // FIXME: at run-time detect assembler capabilities or rely on version
   // FIXME: at run-time detect assembler capabilities or rely on version

+ 1 - 1
lib/Driver/ToolChains/Hexagon.cpp

@@ -76,7 +76,7 @@ static void handleHVXTargetFeatures(const Driver &D, const ArgList &Args,
 
 
   // Handle -mhvx-length=.
   // Handle -mhvx-length=.
   if (Arg *A = Args.getLastArg(options::OPT_mhexagon_hvx_length_EQ)) {
   if (Arg *A = Args.getLastArg(options::OPT_mhexagon_hvx_length_EQ)) {
-    // These falgs are valid only if HVX in enabled.
+    // These flags are valid only if HVX in enabled.
     if (!HasHVX)
     if (!HasHVX)
       D.Diag(diag::err_drv_invalid_hvx_length);
       D.Diag(diag::err_drv_invalid_hvx_length);
     else if (A->getOption().matches(options::OPT_mhexagon_hvx_length_EQ))
     else if (A->getOption().matches(options::OPT_mhexagon_hvx_length_EQ))

+ 3 - 3
lib/Frontend/CompilerInvocation.cpp

@@ -991,7 +991,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
       for (const auto &arg : ASL) {
       for (const auto &arg : ASL) {
         StringRef ArgStr(arg);
         StringRef ArgStr(arg);
         Opts.CmdArgs.insert(Opts.CmdArgs.end(), ArgStr.begin(), ArgStr.end());
         Opts.CmdArgs.insert(Opts.CmdArgs.end(), ArgStr.begin(), ArgStr.end());
-        // using \00 to seperate each commandline options.
+        // using \00 to separate each commandline options.
         Opts.CmdArgs.push_back('\0');
         Opts.CmdArgs.push_back('\0');
       }
       }
     }
     }
@@ -2520,7 +2520,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
                                   VT.getSubminor().getValueOr(0);
                                   VT.getSubminor().getValueOr(0);
   }
   }
 
 
-  // Mimicing gcc's behavior, trigraphs are only enabled if -trigraphs
+  // Mimicking gcc's behavior, trigraphs are only enabled if -trigraphs
   // is specified, or -std is set to a conforming mode.
   // is specified, or -std is set to a conforming mode.
   // Trigraphs are disabled by default in c++1z onwards.
   // Trigraphs are disabled by default in c++1z onwards.
   Opts.Trigraphs = !Opts.GNUMode && !Opts.MSVCCompat && !Opts.CPlusPlus17;
   Opts.Trigraphs = !Opts.GNUMode && !Opts.MSVCCompat && !Opts.CPlusPlus17;
@@ -3259,7 +3259,7 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
     parseSanitizerKinds("-fsanitize=", Args.getAllArgValues(OPT_fsanitize_EQ),
     parseSanitizerKinds("-fsanitize=", Args.getAllArgValues(OPT_fsanitize_EQ),
                         Diags, LangOpts.Sanitize);
                         Diags, LangOpts.Sanitize);
   } else {
   } else {
-    // Other LangOpts are only initialzed when the input is not AST or LLVM IR.
+    // Other LangOpts are only initialized when the input is not AST or LLVM IR.
     // FIXME: Should we really be calling this for an InputKind::Asm input?
     // FIXME: Should we really be calling this for an InputKind::Asm input?
     ParseLangArgs(LangOpts, Args, DashX, Res.getTargetOpts(),
     ParseLangArgs(LangOpts, Args, DashX, Res.getTargetOpts(),
                   Res.getPreprocessorOpts(), Diags);
                   Res.getPreprocessorOpts(), Diags);

+ 1 - 1
lib/Lex/Lexer.cpp

@@ -1015,7 +1015,7 @@ StringRef Lexer::getImmediateMacroName(SourceLocation Loc,
 StringRef Lexer::getImmediateMacroNameForDiagnostics(
 StringRef Lexer::getImmediateMacroNameForDiagnostics(
     SourceLocation Loc, const SourceManager &SM, const LangOptions &LangOpts) {
     SourceLocation Loc, const SourceManager &SM, const LangOptions &LangOpts) {
   assert(Loc.isMacroID() && "Only reasonable to call this on macros");
   assert(Loc.isMacroID() && "Only reasonable to call this on macros");
-  // Walk past macro argument expanions.
+  // Walk past macro argument expansions.
   while (SM.isMacroArgExpansion(Loc))
   while (SM.isMacroArgExpansion(Loc))
     Loc = SM.getImmediateExpansionRange(Loc).getBegin();
     Loc = SM.getImmediateExpansionRange(Loc).getBegin();
 
 

+ 2 - 2
lib/Lex/PPDirectives.cpp

@@ -118,7 +118,7 @@ static bool isReservedId(StringRef Text, const LangOptions &Lang) {
 // the specified module, meaning clang won't build the specified module. This is
 // the specified module, meaning clang won't build the specified module. This is
 // useful in a number of situations, for instance, when building a library that
 // useful in a number of situations, for instance, when building a library that
 // vends a module map, one might want to avoid hitting intermediate build
 // vends a module map, one might want to avoid hitting intermediate build
-// products containig the the module map or avoid finding the system installed
+// products containimg the the module map or avoid finding the system installed
 // modulemap for that library.
 // modulemap for that library.
 static bool isForModuleBuilding(Module *M, StringRef CurrentModule,
 static bool isForModuleBuilding(Module *M, StringRef CurrentModule,
                                 StringRef ModuleName) {
                                 StringRef ModuleName) {
@@ -399,7 +399,7 @@ void Preprocessor::SkipExcludedConditionalBlock(SourceLocation HashTokenLoc,
     // If this is the end of the buffer, we have an error.
     // If this is the end of the buffer, we have an error.
     if (Tok.is(tok::eof)) {
     if (Tok.is(tok::eof)) {
       // We don't emit errors for unterminated conditionals here,
       // We don't emit errors for unterminated conditionals here,
-      // Lexer::LexEndOfFile can do that propertly.
+      // Lexer::LexEndOfFile can do that properly.
       // Just return and let the caller lex after this #include.
       // Just return and let the caller lex after this #include.
       if (PreambleConditionalStack.isRecording())
       if (PreambleConditionalStack.isRecording())
         PreambleConditionalStack.SkipInfo.emplace(
         PreambleConditionalStack.SkipInfo.emplace(

+ 1 - 1
lib/Lex/Preprocessor.cpp

@@ -931,7 +931,7 @@ void Preprocessor::LexAfterModuleImport(Token &Result) {
   // If we have a non-empty module path, load the named module.
   // If we have a non-empty module path, load the named module.
   if (!ModuleImportPath.empty()) {
   if (!ModuleImportPath.empty()) {
     // Under the Modules TS, the dot is just part of the module name, and not
     // Under the Modules TS, the dot is just part of the module name, and not
-    // a real hierarachy separator. Flatten such module names now.
+    // a real hierarchy separator. Flatten such module names now.
     //
     //
     // FIXME: Is this the right level to be performing this transformation?
     // FIXME: Is this the right level to be performing this transformation?
     std::string FlatModuleName;
     std::string FlatModuleName;

+ 1 - 1
lib/Parse/Parser.cpp

@@ -1522,7 +1522,7 @@ Parser::TryAnnotateName(bool IsAddressOfOperand,
 
 
   // Look up and classify the identifier. We don't perform any typo-correction
   // Look up and classify the identifier. We don't perform any typo-correction
   // after a scope specifier, because in general we can't recover from typos
   // after a scope specifier, because in general we can't recover from typos
-  // there (eg, after correcting 'A::tempalte B<X>::C' [sic], we would need to
+  // there (eg, after correcting 'A::template B<X>::C' [sic], we would need to
   // jump back into scope specifier parsing).
   // jump back into scope specifier parsing).
   Sema::NameClassification Classification = Actions.ClassifyName(
   Sema::NameClassification Classification = Actions.ClassifyName(
       getCurScope(), SS, Name, NameLoc, Next, IsAddressOfOperand,
       getCurScope(), SS, Name, NameLoc, Next, IsAddressOfOperand,

+ 2 - 2
lib/Rewrite/RewriteRope.cpp

@@ -59,7 +59,7 @@ using namespace clang;
 ///
 ///
 ///     RopePieceBTreeLeaf - Directly manages up to '2*WidthFactor' RopePiece
 ///     RopePieceBTreeLeaf - Directly manages up to '2*WidthFactor' RopePiece
 ///          nodes.  This directly represents a chunk of the string with those
 ///          nodes.  This directly represents a chunk of the string with those
-///          RopePieces contatenated.
+///          RopePieces concatenated.
 ///     RopePieceBTreeInterior - An interior node in the B+ Tree, which manages
 ///     RopePieceBTreeInterior - An interior node in the B+ Tree, which manages
 ///          up to '2*WidthFactor' other nodes in the tree.
 ///          up to '2*WidthFactor' other nodes in the tree.
 
 
@@ -128,7 +128,7 @@ namespace {
 
 
   /// RopePieceBTreeLeaf - Directly manages up to '2*WidthFactor' RopePiece
   /// RopePieceBTreeLeaf - Directly manages up to '2*WidthFactor' RopePiece
   /// nodes.  This directly represents a chunk of the string with those
   /// nodes.  This directly represents a chunk of the string with those
-  /// RopePieces contatenated.  Since this is a B+Tree, all values (in this case
+  /// RopePieces concatenated.  Since this is a B+Tree, all values (in this case
   /// instances of RopePiece) are stored in leaves like this.  To make iteration
   /// instances of RopePiece) are stored in leaves like this.  To make iteration
   /// over the leaves efficient, they maintain a singly linked list through the
   /// over the leaves efficient, they maintain a singly linked list through the
   /// NextLeaf field.  This allows the B+Tree forward iterator to be constant
   /// NextLeaf field.  This allows the B+Tree forward iterator to be constant

+ 1 - 1
lib/Sema/Sema.cpp

@@ -167,7 +167,7 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer,
 
 
   PreallocatedFunctionScope.reset(new FunctionScopeInfo(Diags));
   PreallocatedFunctionScope.reset(new FunctionScopeInfo(Diags));
 
 
-  // Initilization of data sharing attributes stack for OpenMP
+  // Initialization of data sharing attributes stack for OpenMP
   InitDataSharingAttributesStack();
   InitDataSharingAttributesStack();
 
 
   std::unique_ptr<sema::SemaPPCallbacks> Callbacks =
   std::unique_ptr<sema::SemaPPCallbacks> Callbacks =

+ 1 - 1
lib/Sema/SemaChecking.cpp

@@ -2862,7 +2862,7 @@ bool Sema::CheckMipsBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
   case Mips::BI__builtin_mips_precr_sra_ph_w: i = 2; l = 0; u = 31; break;
   case Mips::BI__builtin_mips_precr_sra_ph_w: i = 2; l = 0; u = 31; break;
   case Mips::BI__builtin_mips_precr_sra_r_ph_w: i = 2; l = 0; u = 31; break;
   case Mips::BI__builtin_mips_precr_sra_r_ph_w: i = 2; l = 0; u = 31; break;
   case Mips::BI__builtin_mips_prepend: i = 2; l = 0; u = 31; break;
   case Mips::BI__builtin_mips_prepend: i = 2; l = 0; u = 31; break;
-  // MSA instrinsics. Instructions (which the intrinsics maps to) which use the
+  // MSA intrinsics. Instructions (which the intrinsics maps to) which use the
   // df/m field.
   // df/m field.
   // These intrinsics take an unsigned 3 bit immediate.
   // These intrinsics take an unsigned 3 bit immediate.
   case Mips::BI__builtin_msa_bclri_b:
   case Mips::BI__builtin_msa_bclri_b:

+ 3 - 3
lib/Sema/SemaDecl.cpp

@@ -8101,7 +8101,7 @@ static OpenCLParamType getOpenCLKernelParameterType(Sema &S, QualType PT) {
     const Type *UnderlyingTy = PT->getPointeeOrArrayElementType();
     const Type *UnderlyingTy = PT->getPointeeOrArrayElementType();
     // Call ourself to check an underlying type of an array. Since the
     // Call ourself to check an underlying type of an array. Since the
     // getPointeeOrArrayElementType returns an innermost type which is not an
     // getPointeeOrArrayElementType returns an innermost type which is not an
-    // array, this recusive call only happens once.
+    // array, this recursive call only happens once.
     return getOpenCLKernelParameterType(S, QualType(UnderlyingTy, 0));
     return getOpenCLKernelParameterType(S, QualType(UnderlyingTy, 0));
   }
   }
 
 
@@ -10520,7 +10520,7 @@ namespace {
       Expr *Base = E;
       Expr *Base = E;
       bool ReferenceField = false;
       bool ReferenceField = false;
 
 
-      // Get the field memebers used.
+      // Get the field members used.
       while (MemberExpr *ME = dyn_cast<MemberExpr>(Base)) {
       while (MemberExpr *ME = dyn_cast<MemberExpr>(Base)) {
         FieldDecl *FD = dyn_cast<FieldDecl>(ME->getMemberDecl());
         FieldDecl *FD = dyn_cast<FieldDecl>(ME->getMemberDecl());
         if (!FD)
         if (!FD)
@@ -16712,7 +16712,7 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange,
       NumNegativeBits = std::max(NumNegativeBits,
       NumNegativeBits = std::max(NumNegativeBits,
                                  (unsigned)InitVal.getMinSignedBits());
                                  (unsigned)InitVal.getMinSignedBits());
 
 
-    // Keep track of whether every enum element has type int (very commmon).
+    // Keep track of whether every enum element has type int (very common).
     if (AllElementsInt)
     if (AllElementsInt)
       AllElementsInt = ECD->getType() == Context.IntTy;
       AllElementsInt = ECD->getType() == Context.IntTy;
   }
   }

+ 3 - 3
lib/Sema/SemaDeclCXX.cpp

@@ -3233,7 +3233,7 @@ namespace {
         ME = dyn_cast<MemberExpr>(ME->getBase()->IgnoreParenImpCasts());
         ME = dyn_cast<MemberExpr>(ME->getBase()->IgnoreParenImpCasts());
       }
       }
 
 
-      // Binding a reference to an unintialized field is not an
+      // Binding a reference to an uninitialized field is not an
       // uninitialized use.
       // uninitialized use.
       if (CheckReferenceOnly && !ReferenceField)
       if (CheckReferenceOnly && !ReferenceField)
         return true;
         return true;
@@ -7683,7 +7683,7 @@ struct FindHiddenVirtualMethod {
   SmallVector<CXXMethodDecl *, 8> OverloadedMethods;
   SmallVector<CXXMethodDecl *, 8> OverloadedMethods;
 
 
 private:
 private:
-  /// Check whether any most overriden method from MD in Methods
+  /// Check whether any most overridden method from MD in Methods
   static bool CheckMostOverridenMethods(
   static bool CheckMostOverridenMethods(
       const CXXMethodDecl *MD,
       const CXXMethodDecl *MD,
       const llvm::SmallPtrSetImpl<const CXXMethodDecl *> &Methods) {
       const llvm::SmallPtrSetImpl<const CXXMethodDecl *> &Methods) {
@@ -7767,7 +7767,7 @@ void Sema::FindHiddenVirtualMethods(CXXMethodDecl *MD,
   FHVM.Method = MD;
   FHVM.Method = MD;
   FHVM.S = this;
   FHVM.S = this;
 
 
-  // Keep the base methods that were overriden or introduced in the subclass
+  // Keep the base methods that were overridden or introduced in the subclass
   // by 'using' in a set. A base method not in this set is hidden.
   // by 'using' in a set. A base method not in this set is hidden.
   CXXRecordDecl *DC = MD->getParent();
   CXXRecordDecl *DC = MD->getParent();
   DeclContext::lookup_result R = DC->lookup(MD->getDeclName());
   DeclContext::lookup_result R = DC->lookup(MD->getDeclName());

+ 1 - 1
lib/Sema/SemaDeclObjC.cpp

@@ -2884,7 +2884,7 @@ void Sema::MatchAllMethodDeclarations(const SelectorSet &InsMap,
                                  IMPDecl, PI, IncompleteImpl, false,
                                  IMPDecl, PI, IncompleteImpl, false,
                                  WarnCategoryMethodImpl);
                                  WarnCategoryMethodImpl);
 
 
-    // FIXME. For now, we are not checking for extact match of methods
+    // FIXME. For now, we are not checking for exact match of methods
     // in category implementation and its primary class's super class.
     // in category implementation and its primary class's super class.
     if (!WarnCategoryMethodImpl && I->getSuperClass())
     if (!WarnCategoryMethodImpl && I->getSuperClass())
       MatchAllMethodDeclarations(InsMap, ClsMap, InsMapSeen, ClsMapSeen,
       MatchAllMethodDeclarations(InsMap, ClsMap, InsMapSeen, ClsMapSeen,

+ 1 - 1
lib/Sema/SemaInit.cpp

@@ -8001,7 +8001,7 @@ ExprResult InitializationSequence::Perform(Sema &S,
     }
     }
 
 
     case SK_OCLSamplerInit: {
     case SK_OCLSamplerInit: {
-      // Sampler initialzation have 5 cases:
+      // Sampler initialization have 5 cases:
       //   1. function argument passing
       //   1. function argument passing
       //      1a. argument is a file-scope variable
       //      1a. argument is a file-scope variable
       //      1b. argument is a function-scope variable
       //      1b. argument is a function-scope variable

+ 2 - 2
lib/Sema/SemaLookup.cpp

@@ -4062,7 +4062,7 @@ void TypoCorrectionConsumer::addNamespaces(
   }
   }
   // Do not transform this into an iterator-based loop. The loop body can
   // Do not transform this into an iterator-based loop. The loop body can
   // trigger the creation of further types (through lazy deserialization) and
   // trigger the creation of further types (through lazy deserialization) and
-  // invalide iterators into this list.
+  // invalid iterators into this list.
   auto &Types = SemaRef.getASTContext().getTypes();
   auto &Types = SemaRef.getASTContext().getTypes();
   for (unsigned I = 0; I != Types.size(); ++I) {
   for (unsigned I = 0; I != Types.size(); ++I) {
     const auto *TI = Types[I];
     const auto *TI = Types[I];
@@ -4203,7 +4203,7 @@ void TypoCorrectionConsumer::performQualifiedLookups() {
           SS->getScopeRep()->print(OldOStream, SemaRef.getPrintingPolicy());
           SS->getScopeRep()->print(OldOStream, SemaRef.getPrintingPolicy());
           OldOStream << Typo->getName();
           OldOStream << Typo->getName();
           // If correction candidate would be an identical written qualified
           // If correction candidate would be an identical written qualified
-          // identifer, then the existing CXXScopeSpec probably included a
+          // identifier, then the existing CXXScopeSpec probably included a
           // typedef that didn't get accounted for properly.
           // typedef that didn't get accounted for properly.
           if (OldOStream.str() == NewQualified)
           if (OldOStream.str() == NewQualified)
             break;
             break;

+ 1 - 1
lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp

@@ -800,7 +800,7 @@ void VariadicMethodTypeChecker::checkPreObjCMessage(const ObjCMethodCall &msg,
 //===----------------------------------------------------------------------===//
 //===----------------------------------------------------------------------===//
 
 
 // The map from container symbol to the container count symbol.
 // The map from container symbol to the container count symbol.
-// We currently will remember the last countainer count symbol encountered.
+// We currently will remember the last container count symbol encountered.
 REGISTER_MAP_WITH_PROGRAMSTATE(ContainerCountMap, SymbolRef, SymbolRef)
 REGISTER_MAP_WITH_PROGRAMSTATE(ContainerCountMap, SymbolRef, SymbolRef)
 REGISTER_MAP_WITH_PROGRAMSTATE(ContainerNonEmptyMap, SymbolRef, bool)
 REGISTER_MAP_WITH_PROGRAMSTATE(ContainerNonEmptyMap, SymbolRef, bool)
 
 

+ 1 - 1
lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp

@@ -188,7 +188,7 @@ void WalkAST::VisitForStmt(ForStmt *FS) {
 }
 }
 
 
 //===----------------------------------------------------------------------===//
 //===----------------------------------------------------------------------===//
-// Check: floating poing variable used as loop counter.
+// Check: floating point variable used as loop counter.
 // Originally: <rdar://problem/6336718>
 // Originally: <rdar://problem/6336718>
 // Implements: CERT security coding advisory FLP-30.
 // Implements: CERT security coding advisory FLP-30.
 //===----------------------------------------------------------------------===//
 //===----------------------------------------------------------------------===//

+ 1 - 1
lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp

@@ -169,7 +169,7 @@ public:
   /// This callback should be used by the checkers to aggressively clean
   /// This callback should be used by the checkers to aggressively clean
   /// up/reduce the checker state, which is important for reducing the overall
   /// up/reduce the checker state, which is important for reducing the overall
   /// memory usage. Specifically, if a checker keeps symbol specific information
   /// memory usage. Specifically, if a checker keeps symbol specific information
-  /// in the sate, it can and should be dropped after the symbol becomes dead.
+  /// in the state, it can and should be dropped after the symbol becomes dead.
   /// In addition, reporting a bug as soon as the checker becomes dead leads to
   /// In addition, reporting a bug as soon as the checker becomes dead leads to
   /// more precise diagnostics. (For example, one should report that a malloced
   /// more precise diagnostics. (For example, one should report that a malloced
   /// variable is not freed right after it goes out of scope.)
   /// variable is not freed right after it goes out of scope.)

+ 1 - 1
lib/StaticAnalyzer/Checkers/CloneChecker.cpp

@@ -42,7 +42,7 @@ public:
   void reportClones(BugReporter &BR, AnalysisManager &Mgr,
   void reportClones(BugReporter &BR, AnalysisManager &Mgr,
                     std::vector<CloneDetector::CloneGroup> &CloneGroups) const;
                     std::vector<CloneDetector::CloneGroup> &CloneGroups) const;
 
 
-  /// Reports only suspicious clones to the user along with informaton
+  /// Reports only suspicious clones to the user along with information
   /// that explain why they are suspicious.
   /// that explain why they are suspicious.
   void reportSuspiciousClones(
   void reportSuspiciousClones(
       BugReporter &BR, AnalysisManager &Mgr,
       BugReporter &BR, AnalysisManager &Mgr,

+ 2 - 2
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp

@@ -551,7 +551,7 @@ void IteratorChecker::checkPreCall(const CallEvent &Call,
     // 
     // 
     // In this case the first two arguments to f() must be iterators must belong
     // In this case the first two arguments to f() must be iterators must belong
     // to the same container and the last to also to the same container but
     // to the same container and the last to also to the same container but
-    // not neccessarily to the same as the first two.
+    // not necessarily to the same as the first two.
 
 
     if (!ChecksEnabled[CK_MismatchedIteratorChecker])
     if (!ChecksEnabled[CK_MismatchedIteratorChecker])
       return;
       return;
@@ -1213,7 +1213,7 @@ void IteratorChecker::handleAssign(CheckerContext &C, const SVal &Cont,
       const auto OldCData = getContainerData(State, OldContReg);
       const auto OldCData = getContainerData(State, OldContReg);
       if (OldCData) {
       if (OldCData) {
         if (const auto OldEndSym = OldCData->getEnd()) {
         if (const auto OldEndSym = OldCData->getEnd()) {
-          // If we already assigned an "end" symbol to the old conainer, then
+          // If we already assigned an "end" symbol to the old container, then
           // first reassign all iterator positions to the new container which
           // first reassign all iterator positions to the new container which
           // are not past the container (thus not greater or equal to the
           // are not past the container (thus not greater or equal to the
           // current "end" symbol).
           // current "end" symbol).

+ 1 - 1
lib/StaticAnalyzer/Checkers/MallocChecker.cpp

@@ -1083,7 +1083,7 @@ void MallocChecker::processNewAllocation(const CXXNewExpr *NE,
   ProgramStateRef State = C.getState();
   ProgramStateRef State = C.getState();
   // The return value from operator new is bound to a specified initialization
   // The return value from operator new is bound to a specified initialization
   // value (if any) and we don't want to loose this value. So we call
   // value (if any) and we don't want to loose this value. So we call
-  // MallocUpdateRefState() instead of MallocMemAux() which breakes the
+  // MallocUpdateRefState() instead of MallocMemAux() which breaks the
   // existing binding.
   // existing binding.
   State = MallocUpdateRefState(C, NE, State, NE->isArray() ? AF_CXXNewArray
   State = MallocUpdateRefState(C, NE, State, NE->isArray() ? AF_CXXNewArray
                                                            : AF_CXXNew, Target);
                                                            : AF_CXXNew, Target);

+ 1 - 1
lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp

@@ -185,7 +185,7 @@ private:
   const SymbolicRegion *getTrackRegion(SVal Val,
   const SymbolicRegion *getTrackRegion(SVal Val,
                                        bool CheckSuperRegion = false) const;
                                        bool CheckSuperRegion = false) const;
 
 
-  /// Returns true if the call is diagnosable in the currrent analyzer
+  /// Returns true if the call is diagnosable in the current analyzer
   /// configuration.
   /// configuration.
   bool isDiagnosableCall(const CallEvent &Call) const {
   bool isDiagnosableCall(const CallEvent &Call) const {
     if (NoDiagnoseCallsToSystemHeaders && Call.isInSystemHeader())
     if (NoDiagnoseCallsToSystemHeaders && Call.isInSystemHeader())

+ 1 - 1
lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp

@@ -112,7 +112,7 @@ PointerArithChecker::getPointedRegion(const MemRegion *Region,
 }
 }
 
 
 /// Checks whether a region is the part of an array.
 /// Checks whether a region is the part of an array.
-/// In case there is a dericed to base cast above the array element, the
+/// In case there is a derived to base cast above the array element, the
 /// Polymorphic output value is set to true. AKind output value is set to the
 /// Polymorphic output value is set to true. AKind output value is set to the
 /// allocation kind of the inspected region.
 /// allocation kind of the inspected region.
 const MemRegion *PointerArithChecker::getArrayRegion(const MemRegion *Region,
 const MemRegion *PointerArithChecker::getArrayRegion(const MemRegion *Region,

+ 1 - 1
lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp

@@ -418,7 +418,7 @@ static AllocationInfo GetAllocationSite(ProgramStateManager &StateMgr,
     // AllocationNodeInCurrentContext, is the last node in the current or
     // AllocationNodeInCurrentContext, is the last node in the current or
     // parent context in which the symbol was tracked.
     // parent context in which the symbol was tracked.
     //
     //
-    // Note that the allocation site might be in the parent conext. For example,
+    // Note that the allocation site might be in the parent context. For example,
     // the case where an allocation happens in a block that captures a reference
     // the case where an allocation happens in a block that captures a reference
     // to it and that reference is overwritten/dropped by another call to
     // to it and that reference is overwritten/dropped by another call to
     // the block.
     // the block.

+ 3 - 3
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h

@@ -21,7 +21,7 @@
 //     `-analyzer-config alpha.cplusplus.UninitializedObject:Pedantic=true`.
 //     `-analyzer-config alpha.cplusplus.UninitializedObject:Pedantic=true`.
 //
 //
 //   - "NotesAsWarnings" (boolean). If set to true, the checker will emit a
 //   - "NotesAsWarnings" (boolean). If set to true, the checker will emit a
-//     warning for each uninitalized field, as opposed to emitting one warning
+//     warning for each uninitialized field, as opposed to emitting one warning
 //     per constructor call, and listing the uninitialized fields that belongs
 //     per constructor call, and listing the uninitialized fields that belongs
 //     to it in notes. Defaults to false.
 //     to it in notes. Defaults to false.
 //
 //
@@ -234,7 +234,7 @@ private:
   //   * every node is an object that is
   //   * every node is an object that is
   //     - a union
   //     - a union
   //     - a non-union record
   //     - a non-union record
-  //     - dereferencable (see isDereferencableType())
+  //     - dereferenceable (see isDereferencableType())
   //     - an array
   //     - an array
   //     - of a primitive type (see isPrimitiveType())
   //     - of a primitive type (see isPrimitiveType())
   //   * the parent of each node is the object that contains it
   //   * the parent of each node is the object that contains it
@@ -275,7 +275,7 @@ private:
   //   this->iptr (pointee uninit)
   //   this->iptr (pointee uninit)
   //   this->bptr (pointer uninit)
   //   this->bptr (pointer uninit)
   //
   //
-  // We'll traverse each node of the above graph with the appropiate one of
+  // We'll traverse each node of the above graph with the appropriate one of
   // these methods:
   // these methods:
 
 
   /// Checks the region of a union object, and returns true if no field is
   /// Checks the region of a union object, and returns true if no field is

+ 1 - 1
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp

@@ -233,7 +233,7 @@ bool FindUninitializedFields::addFieldToUninits(FieldChainInfo Chain,
 
 
   assert((PointeeR || !isDereferencableType(FR->getDecl()->getType())) &&
   assert((PointeeR || !isDereferencableType(FR->getDecl()->getType())) &&
          "One must also pass the pointee region as a parameter for "
          "One must also pass the pointee region as a parameter for "
-         "dereferencable fields!");
+         "dereferenceable fields!");
 
 
   if (State->contains<AnalyzedRegions>(FR))
   if (State->contains<AnalyzedRegions>(FR))
     return false;
     return false;

+ 1 - 1
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp

@@ -144,7 +144,7 @@ bool FindUninitializedFields::isDereferencableUninit(
 
 
   assert((isDereferencableType(FR->getDecl()->getType()) ||
   assert((isDereferencableType(FR->getDecl()->getType()) ||
           V.getAs<nonloc::LocAsInteger>()) &&
           V.getAs<nonloc::LocAsInteger>()) &&
-         "This method only checks dereferencable objects!");
+         "This method only checks dereferenceable objects!");
 
 
   if (V.isUnknown() || V.getAs<loc::ConcreteInt>()) {
   if (V.isUnknown() || V.getAs<loc::ConcreteInt>()) {
     IsAnyFieldInitialized = true;
     IsAnyFieldInitialized = true;

+ 1 - 1
lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp

@@ -232,7 +232,7 @@ bool UnreachableCodeChecker::isInvalidPath(const CFGBlock *CB,
   if (!pred)
   if (!pred)
     return false;
     return false;
 
 
-  // Get the predecessor block's terminator conditon
+  // Get the predecessor block's terminator condition
   const Stmt *cond = pred->getTerminatorCondition();
   const Stmt *cond = pred->getTerminatorCondition();
 
 
   //assert(cond && "CFGBlock's predecessor has a terminator condition");
   //assert(cond && "CFGBlock's predecessor has a terminator condition");

+ 1 - 1
lib/StaticAnalyzer/Core/BugReporter.cpp

@@ -820,7 +820,7 @@ void generateMinimalDiagForBlockEdge(const ExplodedNode *N, BlockEdge BE,
 // and values by tracing interesting calculations backwards through evaluated
 // and values by tracing interesting calculations backwards through evaluated
 // expressions along a path.  This is probably overly complicated, but the idea
 // expressions along a path.  This is probably overly complicated, but the idea
 // is that if an expression computed an "interesting" value, the child
 // is that if an expression computed an "interesting" value, the child
-// expressions are are also likely to be "interesting" as well (which then
+// expressions are also likely to be "interesting" as well (which then
 // propagates to the values they in turn compute).  This reverse propagation
 // propagates to the values they in turn compute).  This reverse propagation
 // is needed to track interesting correlations across function call boundaries,
 // is needed to track interesting correlations across function call boundaries,
 // where formal arguments bind to actual arguments, etc.  This is also needed
 // where formal arguments bind to actual arguments, etc.  This is also needed

+ 2 - 2
lib/StaticAnalyzer/Core/ExprEngine.cpp

@@ -203,7 +203,7 @@ ExprEngine::ExprEngine(cross_tu::CrossTranslationUnitContext &CTU,
       VisitedCallees(VisitedCalleesIn), HowToInline(HowToInlineIn) {
       VisitedCallees(VisitedCalleesIn), HowToInline(HowToInlineIn) {
   unsigned TrimInterval = mgr.options.GraphTrimInterval;
   unsigned TrimInterval = mgr.options.GraphTrimInterval;
   if (TrimInterval != 0) {
   if (TrimInterval != 0) {
-    // Enable eager node reclaimation when constructing the ExplodedGraph.
+    // Enable eager node reclamation when constructing the ExplodedGraph.
     G.enableNodeReclamation(TrimInterval);
     G.enableNodeReclamation(TrimInterval);
   }
   }
 }
 }
@@ -1033,7 +1033,7 @@ void ExprEngine::ProcessTemporaryDtor(const CFGTemporaryDtor D,
     MR = V->getAsRegion();
     MR = V->getAsRegion();
   }
   }
 
 
-  // If copy elision has occured, and the constructor corresponding to the
+  // If copy elision has occurred, and the constructor corresponding to the
   // destructor was elided, we need to skip the destructor as well.
   // destructor was elided, we need to skip the destructor as well.
   if (isDestructorElided(State, BTE, LC)) {
   if (isDestructorElided(State, BTE, LC)) {
     State = cleanupElidedDestructor(State, BTE, LC);
     State = cleanupElidedDestructor(State, BTE, LC);

+ 3 - 3
lib/StaticAnalyzer/Core/PlistDiagnostics.cpp

@@ -861,7 +861,7 @@ static std::string getMacroNameAndPrintExpansion(TokenPrinter &Printer,
     assert(II &&
     assert(II &&
           "This token is an identifier but has no IdentifierInfo!");
           "This token is an identifier but has no IdentifierInfo!");
 
 
-    // If this token is a macro that should be expanded inside the currect
+    // If this token is a macro that should be expanded inside the current
     // macro.
     // macro.
     if (const MacroInfo *MI =
     if (const MacroInfo *MI =
                          getMacroInfoForLocation(PP, SM, II, T.getLocation())) {
                          getMacroInfoForLocation(PP, SM, II, T.getLocation())) {
@@ -869,7 +869,7 @@ static std::string getMacroNameAndPrintExpansion(TokenPrinter &Printer,
 
 
       // If this is a function-like macro, skip its arguments, as
       // If this is a function-like macro, skip its arguments, as
       // getExpandedMacro() already printed them. If this is the case, let's
       // getExpandedMacro() already printed them. If this is the case, let's
-      // first jumo to the '(' token.
+      // first jump to the '(' token.
       if (MI->getNumParams() != 0)
       if (MI->getNumParams() != 0)
         It = getMatchingRParen(++It, E);
         It = getMatchingRParen(++It, E);
       continue;
       continue;
@@ -960,7 +960,7 @@ static MacroNameAndArgs getMacroNameAndArgs(SourceLocation ExpanLoc,
   //   CALL_FN(someFunctionName(param1, param2))
   //   CALL_FN(someFunctionName(param1, param2))
   // we will find tok::l_paren, tok::r_paren, and tok::comma that do not divide
   // we will find tok::l_paren, tok::r_paren, and tok::comma that do not divide
   // actual macro arguments, or do not represent the macro argument's closing
   // actual macro arguments, or do not represent the macro argument's closing
-  // parantheses, so we'll count how many parantheses aren't closed yet.
+  // parentheses, so we'll count how many parentheses aren't closed yet.
   // If ParanthesesDepth
   // If ParanthesesDepth
   //   * = 0, then there are no more arguments to lex.
   //   * = 0, then there are no more arguments to lex.
   //   * = 1, then if we find a tok::comma, we can start lexing the next arg.
   //   * = 1, then if we find a tok::comma, we can start lexing the next arg.

+ 1 - 1
lib/StaticAnalyzer/Core/Store.cpp

@@ -88,7 +88,7 @@ const MemRegion *StoreManager::castRegion(const MemRegion *R, QualType CastToTy)
       return R;
       return R;
 
 
     // We don't know what to make of it.  Return a NULL region, which
     // We don't know what to make of it.  Return a NULL region, which
-    // will be interpretted as UnknownVal.
+    // will be interpreted as UnknownVal.
     return nullptr;
     return nullptr;
   }
   }
 
 

+ 1 - 1
lib/StaticAnalyzer/Core/WorkList.cpp

@@ -152,7 +152,7 @@ public:
     auto BE = N->getLocation().getAs<BlockEntrance>();
     auto BE = N->getLocation().getAs<BlockEntrance>();
 
 
     if (!BE) {
     if (!BE) {
-      // Assume the choice of the order of the preceeding block entrance was
+      // Assume the choice of the order of the preceding block entrance was
       // correct.
       // correct.
       StackUnexplored.push_back(U);
       StackUnexplored.push_back(U);
     } else {
     } else {

+ 6 - 6
lib/StaticAnalyzer/README.txt

@@ -69,23 +69,23 @@ triggered the problem.
 
 
 = Notes about C++ =
 = Notes about C++ =
 
 
-Since now constructors are seen before the variable that is constructed 
-in the CFG, we create a temporary object as the destination region that 
+Since now constructors are seen before the variable that is constructed
+in the CFG, we create a temporary object as the destination region that
 is constructed into. See ExprEngine::VisitCXXConstructExpr().
 is constructed into. See ExprEngine::VisitCXXConstructExpr().
 
 
 In ExprEngine::processCallExit(), we always bind the object region to the
 In ExprEngine::processCallExit(), we always bind the object region to the
 evaluated CXXConstructExpr. Then in VisitDeclStmt(), we compute the
 evaluated CXXConstructExpr. Then in VisitDeclStmt(), we compute the
 corresponding lazy compound value if the variable is not a reference, and
 corresponding lazy compound value if the variable is not a reference, and
 bind the variable region to the lazy compound value. If the variable
 bind the variable region to the lazy compound value. If the variable
-is a reference, just use the object region as the initilizer value.
+is a reference, just use the object region as the initializer value.
 
 
 Before entering a C++ method (or ctor/dtor), the 'this' region is bound
 Before entering a C++ method (or ctor/dtor), the 'this' region is bound
-to the object region. In ctors, we synthesize 'this' region with  
+to the object region. In ctors, we synthesize 'this' region with
 CXXRecordDecl*, which means we do not use type qualifiers. In methods, we
 CXXRecordDecl*, which means we do not use type qualifiers. In methods, we
-synthesize 'this' region with CXXMethodDecl*, which has getThisType() 
+synthesize 'this' region with CXXMethodDecl*, which has getThisType()
 taking type qualifiers into account. It does not matter we use qualified
 taking type qualifiers into account. It does not matter we use qualified
 'this' region in one method and unqualified 'this' region in another
 'this' region in one method and unqualified 'this' region in another
-method, because we only need to ensure the 'this' region is consistent 
+method, because we only need to ensure the 'this' region is consistent
 when we synthesize it and create it directly from CXXThisExpr in a single
 when we synthesize it and create it directly from CXXThisExpr in a single
 method call.
 method call.