[clang] cc8237d - [documentation] Fix some typos

Samuel Tebbs via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 30 07:56:23 PDT 2023


Author: Ayushi Shukla
Date: 2023-03-30T15:58:02+01:00
New Revision: cc8237d9d727b864fe65d2c9d620f3332f4235ca

URL: https://github.com/llvm/llvm-project/commit/cc8237d9d727b864fe65d2c9d620f3332f4235ca
DIFF: https://github.com/llvm/llvm-project/commit/cc8237d9d727b864fe65d2c9d620f3332f4235ca.diff

LOG: [documentation] Fix some typos

This patch fixes https://github.com/llvm/llvm-project/issues/56747

Patch-By: ayushi-8102

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

Added: 
    

Modified: 
    clang/docs/AutomaticReferenceCounting.rst
    clang/docs/ConstantInterpreter.rst
    clang/docs/CrossCompilation.rst
    clang/docs/DataFlowAnalysisIntro.md
    clang/docs/DebuggingCoroutines.rst
    clang/docs/analyzer/developer-docs/nullability.rst
    clang/include/clang/AST/CXXInheritance.h
    clang/include/clang/AST/CommentSema.h
    clang/include/clang/AST/Decl.h
    clang/include/clang/AST/DeclBase.h
    clang/include/clang/AST/DeclTemplate.h
    clang/include/clang/AST/DeclarationName.h
    clang/include/clang/AST/Expr.h
    clang/include/clang/Analysis/Analyses/CalledOnceCheck.h
    clang/include/clang/Analysis/Analyses/Consumed.h

Removed: 
    


################################################################################
diff  --git a/clang/docs/AutomaticReferenceCounting.rst b/clang/docs/AutomaticReferenceCounting.rst
index 5e40fa837b1aa..640f3f7dec390 100644
--- a/clang/docs/AutomaticReferenceCounting.rst
+++ b/clang/docs/AutomaticReferenceCounting.rst
@@ -635,7 +635,7 @@ retain-agnostic, the conversion is treated as a ``__bridge`` cast.
 
   For loads from ``const`` global variables of :ref:`C retainable pointer type
   <arc.misc.c-retainable>`, it is reasonable to assume that global system
-  constants were initialitzed with true constants (e.g. string literals), but
+  constants were initialized with true constants (e.g. string literals), but
   user constants might have been initialized with something dynamically
   allocated, using a global initializer.
 

diff  --git a/clang/docs/ConstantInterpreter.rst b/clang/docs/ConstantInterpreter.rst
index eba637585b8f0..0c5b09c73ee30 100644
--- a/clang/docs/ConstantInterpreter.rst
+++ b/clang/docs/ConstantInterpreter.rst
@@ -81,7 +81,7 @@ Primitive Types
 
 * ``PT_VoidPtr``
 
-  Void pointer type, can be used for rount-trip casts. Represented as
+  Void pointer type, can be used for round-trip casts. Represented as
   the union of all pointers which can be cast to void.
   Defined in ``"VoidPointer.h"``.
 

diff  --git a/clang/docs/CrossCompilation.rst b/clang/docs/CrossCompilation.rst
index 3578eb3e4db01..48f0f72477544 100644
--- a/clang/docs/CrossCompilation.rst
+++ b/clang/docs/CrossCompilation.rst
@@ -97,7 +97,7 @@ choose ``unknown`` and the defaults will be used. If you choose a parameter
 that Clang doesn't know, like ``blerg``, it'll ignore and assume
 ``unknown``, which is not always desired, so be careful.
 
-Finally, the env (enviornment) option is something that will pick default
+Finally, the env (environment) option is something that will pick default
 CPU/FPU, define the specific behaviour of your code (PCS, extensions),
 and also choose the correct library calls, etc.
 

diff  --git a/clang/docs/DataFlowAnalysisIntro.md b/clang/docs/DataFlowAnalysisIntro.md
index 8bfecd24906cb..67faae0cd9e72 100644
--- a/clang/docs/DataFlowAnalysisIntro.md
+++ b/clang/docs/DataFlowAnalysisIntro.md
@@ -219,7 +219,7 @@ the function:
     this fact as `⊤`.
 
 *   When two control flow paths join, we compute the set union of incoming
-    values (limiting the number of elements to 3, representig larger sets as
+    values (limiting the number of elements to 3, representing larger sets as
     `⊤`).
 
 The sets of possible values are influenced by:
@@ -332,7 +332,7 @@ void PrintAbs(int x) {
 We can't say what specific value gets printed, but we know that it is either `x`
 or `-x`.
 
-Dataflow analysis is an istance of abstract interpretation, and does not dictate
+Dataflow analysis is an instance of abstract interpretation, and does not dictate
 how exactly the lattice and transfer functions should be designed, beyond the
 necessary conditions for the analysis to converge. Nevertheless, we can use
 symbolic execution ideas to guide our design of the lattice and transfer
@@ -634,7 +634,7 @@ void Uninit() {
 
 For this purpose we can use lattice in a form of a mapping from variable
 declarations to initialization states; each initialization state is represented
-by the followingn lattice:
+by the following lattice:
 
 ![Lattice for definitive initialization analysis](DataFlowAnalysisIntroImages/DefinitiveInitializationLattice.svg)
 

diff  --git a/clang/docs/DebuggingCoroutines.rst b/clang/docs/DebuggingCoroutines.rst
index ae5359117775b..591d2eadabe53 100644
--- a/clang/docs/DebuggingCoroutines.rst
+++ b/clang/docs/DebuggingCoroutines.rst
@@ -620,7 +620,7 @@ Then let's run:
 
   $ clang++ -std=c++20 -g debugging-example.cpp -o debugging-example
   $ gdb ./debugging-example
-  (gdb) # We've alreay set the breakpoint.
+  (gdb) # We've already set the breakpoint.
   (gdb) r
   Program received signal SIGTRAP, Trace/breakpoint trap.
   detail::chain_fn<0> () at debugging-example2.cpp:73

diff  --git a/clang/docs/analyzer/developer-docs/nullability.rst b/clang/docs/analyzer/developer-docs/nullability.rst
index f4be0b57719ee..70e1958634ad9 100644
--- a/clang/docs/analyzer/developer-docs/nullability.rst
+++ b/clang/docs/analyzer/developer-docs/nullability.rst
@@ -18,7 +18,7 @@ If a pointer ``p`` has a nullable annotation and no explicit null check or asser
 
 Taking a branch on nullable pointers are the same like taking branch on null unspecified pointers.
 
-Explicit cast from nullable to nonnul:
+Explicit cast from nullable to nonnull:
 
 .. code-block:: cpp
 

diff  --git a/clang/include/clang/AST/CXXInheritance.h b/clang/include/clang/AST/CXXInheritance.h
index 946b9e318baa2..eec2119f4a180 100644
--- a/clang/include/clang/AST/CXXInheritance.h
+++ b/clang/include/clang/AST/CXXInheritance.h
@@ -315,7 +315,7 @@ class OverridingMethods {
 /// virtual function; in abstract classes, the final overrider for at
 /// least one virtual function is a pure virtual function. Due to
 /// multiple, virtual inheritance, it is possible for a class to have
-/// more than one final overrider. Athough this is an error (per C++
+/// more than one final overrider. Although this is an error (per C++
 /// [class.virtual]p2), it is not considered an error here: the final
 /// overrider map can represent multiple final overriders for a
 /// method, and it is up to the client to determine whether they are

diff  --git a/clang/include/clang/AST/CommentSema.h b/clang/include/clang/AST/CommentSema.h
index 9c2ca5f8e6037..5d8df7dbf385a 100644
--- a/clang/include/clang/AST/CommentSema.h
+++ b/clang/include/clang/AST/CommentSema.h
@@ -193,7 +193,7 @@ class Sema {
   void checkContainerDecl(const BlockCommandComment *Comment);
 
   /// Resolve parameter names to parameter indexes in function declaration.
-  /// Emit diagnostics about unknown parametrs.
+  /// Emit diagnostics about unknown parameters.
   void resolveParamCommandIndexes(const FullComment *FC);
 
   /// \returns \c true if the declaration that this comment is attached to

diff  --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index 0585fda3a566c..3ae1552189609 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -2168,7 +2168,7 @@ class FunctionDecl : public DeclaratorDecl,
   /// declaration to the declaration that is a definition (if there is one).
   ///
   /// \param CheckForPendingFriendDefinition If \c true, also check for friend
-  ///        declarations that were instantiataed from function definitions.
+  ///        declarations that were instantiated from function definitions.
   ///        Such a declaration behaves as if it is a definition for the
   ///        purpose of redefinition checking, but isn't actually a "real"
   ///        definition until its body is instantiated.

diff  --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h
index e736f827f04b4..e86eadab0a8a4 100644
--- a/clang/include/clang/AST/DeclBase.h
+++ b/clang/include/clang/AST/DeclBase.h
@@ -1601,7 +1601,7 @@ class DeclContext {
     uint64_t : NumDeclContextBits;
 
     /// Kind of initializer,
-    /// function call or omp_priv<init_expr> initializtion.
+    /// function call or omp_priv<init_expr> initialization.
     uint64_t InitializerKind : 2;
   };
 

diff  --git a/clang/include/clang/AST/DeclTemplate.h b/clang/include/clang/AST/DeclTemplate.h
index f2a1e165a70f3..03d5b778d26bf 100644
--- a/clang/include/clang/AST/DeclTemplate.h
+++ b/clang/include/clang/AST/DeclTemplate.h
@@ -850,7 +850,7 @@ class RedeclarableTemplateDecl : public TemplateDecl,
     /// template.
     ///
     /// This pointer refers to the template arguments (there are as
-    /// many template arguments as template parameaters) for the
+    /// many template arguments as template parameters) for the
     /// template, and is allocated lazily, since most templates do not
     /// require the use of this information.
     TemplateArgument *InjectedArgs = nullptr;

diff  --git a/clang/include/clang/AST/DeclarationName.h b/clang/include/clang/AST/DeclarationName.h
index 1496e213dd769..b682a75e65764 100644
--- a/clang/include/clang/AST/DeclarationName.h
+++ b/clang/include/clang/AST/DeclarationName.h
@@ -763,7 +763,7 @@ class DeclarationNameLoc {
 };
 
 /// DeclarationNameInfo - A collector data type for bundling together
-/// a DeclarationName and the correspnding source/type location info.
+/// a DeclarationName and the corresponding source/type location info.
 struct DeclarationNameInfo {
 private:
   /// Name - The declaration name, also encoding name kind.

diff  --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h
index 28c23c5c0be91..d2a8f0349b257 100644
--- a/clang/include/clang/AST/Expr.h
+++ b/clang/include/clang/AST/Expr.h
@@ -135,8 +135,8 @@ class Expr : public ValueStmt {
   void setDependence(ExprDependence Deps) {
     ExprBits.Dependent = static_cast<unsigned>(Deps);
   }
-  friend class ASTImporter; // Sets dependence dircetly.
-  friend class ASTStmtReader; // Sets dependence dircetly.
+  friend class ASTImporter;   // Sets dependence directly.
+  friend class ASTStmtReader; // Sets dependence directly.
 
 public:
   QualType getType() const { return TR; }
@@ -171,7 +171,7 @@ class Expr : public ValueStmt {
   }
 
   /// Determines whether the type of this expression depends on
-  ///   - a template paramter (C++ [temp.dep.expr], which means that its type
+  ///   - a template parameter (C++ [temp.dep.expr], which means that its type
   ///     could change from one template instantiation to the next)
   ///   - or an error
   ///
@@ -820,7 +820,7 @@ class Expr : public ValueStmt {
   /// member expression.
   static QualType findBoundMemberType(const Expr *expr);
 
-  /// Skip past any invisble AST nodes which might surround this
+  /// Skip past any invisible AST nodes which might surround this
   /// statement, such as ExprWithCleanups or ImplicitCastExpr nodes,
   /// but also injected CXXMemberExpr and CXXConstructExpr which represent
   /// implicit conversions.
@@ -924,7 +924,7 @@ class Expr : public ValueStmt {
     return const_cast<Expr *>(this)->IgnoreParenLValueCasts();
   }
 
-  /// Skip past any parenthese and casts which do not change the value
+  /// Skip past any parentheses and casts which do not change the value
   /// (including ptr->int casts of the same size) until reaching a fixed point.
   /// Skips:
   /// * What IgnoreParens() skips
@@ -2815,7 +2815,7 @@ class CallExpr : public Expr {
   /// The number of arguments in the call expression.
   unsigned NumArgs;
 
-  /// The location of the right parenthese. This has a 
diff erent meaning for
+  /// The location of the right parentheses. This has a 
diff erent meaning for
   /// the derived classes of CallExpr.
   SourceLocation RParenLoc;
 

diff  --git a/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h b/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h
index b65a3967cd50d..6a1528a2da248 100644
--- a/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h
+++ b/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h
@@ -28,7 +28,7 @@ class Stmt;
 /// \enum IfThen -- then branch of the if statement has no call.
 /// \enum IfElse -- else branch of the if statement has no call.
 /// \enum Switch -- one of the switch cases doesn't have a call.
-/// \enum SwitchSkipped -- there is no call if none of the cases appies.
+/// \enum SwitchSkipped -- there is no call if none of the cases applies.
 /// \enum LoopEntered -- no call when the loop is entered.
 /// \enum LoopSkipped -- no call when the loop is not entered.
 /// \enum FallbackReason -- fallback case when we were not able to figure out

diff  --git a/clang/include/clang/Analysis/Analyses/Consumed.h b/clang/include/clang/Analysis/Analyses/Consumed.h
index 24702567ab6c3..d333fadff0478 100644
--- a/clang/include/clang/Analysis/Analyses/Consumed.h
+++ b/clang/include/clang/Analysis/Analyses/Consumed.h
@@ -258,7 +258,7 @@ namespace consumed {
     /// Check a function's CFG for consumed violations.
     ///
     /// We traverse the blocks in the CFG, keeping track of the state of each
-    /// value who's type has uniquness annotations.  If methods are invoked in
+    /// value who's type has uniqueness annotations.  If methods are invoked in
     /// the wrong state a warning is issued.  Each block in the CFG is traversed
     /// exactly once.
     void run(AnalysisDeclContext &AC);


        


More information about the cfe-commits mailing list