[documentation] Fix some typos
authorAyushi Shukla <ayushi.shukla8102@gmail.com>
Thu, 30 Mar 2023 14:55:49 +0000 (15:55 +0100)
committerSamuel Tebbs <samuel.tebbs@arm.com>
Thu, 30 Mar 2023 14:58:02 +0000 (15:58 +0100)
This patch fixes https://github.com/llvm/llvm-project/issues/56747

Patch-By: ayushi-8102
Differential Revision: https://reviews.llvm.org/D146892

15 files changed:
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

index 5e40fa8..640f3f7 100644 (file)
@@ -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.
 
index eba6375..0c5b09c 100644 (file)
@@ -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"``.
 
index 3578eb3..48f0f72 100644 (file)
@@ -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.
 
index 8bfecd2..67faae0 100644 (file)
@@ -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)
 
index ae53591..591d2ea 100644 (file)
@@ -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
index f4be0b5..70e1958 100644 (file)
@@ -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
 
index 946b9e3..eec2119 100644 (file)
@@ -315,7 +315,7 @@ public:
 /// 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
index 9c2ca5f..5d8df7d 100644 (file)
@@ -193,7 +193,7 @@ private:
   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
index 0585fda..3ae1552 100644 (file)
@@ -2168,7 +2168,7 @@ public:
   /// 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.
index e736f82..e86eada 100644 (file)
@@ -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;
   };
 
index f2a1e16..03d5b77 100644 (file)
@@ -850,7 +850,7 @@ protected:
     /// 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;
index 1496e21..b682a75 100644 (file)
@@ -763,7 +763,7 @@ public:
 };
 
 /// 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.
index 28c23c5..d2a8f03 100644 (file)
@@ -135,8 +135,8 @@ protected:
   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 @@ public:
   }
 
   /// 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 @@ public:
   /// 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 @@ public:
     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 different meaning for
+  /// The location of the right parentheses. This has a different meaning for
   /// the derived classes of CallExpr.
   SourceLocation RParenLoc;
 
index b65a396..6a1528a 100644 (file)
@@ -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
index 2470256..d333fad 100644 (file)
@@ -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);