From: Dhruv Chawla <[email protected]>

Signed-off-by: Dhruv Chawla <[email protected]>

gcc/analyzer/ChangeLog:

        * access-diagram.cc: Fix typos.
        * analyzer.cc (fixup_tree_for_diagnostic_1): Likewise.
        (tree_to_json): Likewise.
        * bounds-checking.cc: Likewise.
        * constraint-manager.cc 
(constraint_manager::impossible_derived_conditions_p): Likewise.
        * diagnostic-manager.cc (prune_frame): Likewise.
        * engine.cc (get_eh_outedge): Likewise.
        (maybe_process_run_of_enodes): Likewise.
        * inlining-iterator.h: Likewise.
        * ops.cc (call_and_return_op::execute): Likewise.
        * pending-diagnostic.h (class pending_diagnostic): Likewise.
        * region-model-asm.cc: Likewise.
        * region-model.cc (check_one_function_attr_null_terminated_string_arg): 
Likewise.
        (region_model::deref_rvalue): Likewise.
        (region_model::scan_for_null_terminator): Likewise.
        (region_model::check_for_null_terminated_string_arg): Likewise.
        (model_merger::mergeable_svalue_p): Likewise.
        (test_canonicalization_4): Likewise.
        * region.cc (region::accept): Likewise.
        * setjmp-longjmp.cc (region_model::on_longjmp): Likewise.
        * sm-fd.cc: Likewise.
        * sm-malloc.cc: Likewise.
        * sm-taint.cc: Likewise.
        * store.cc (binding_cluster::maybe_get_compound_binding): Likewise.
        (binding_cluster::can_merge_p): Likewise.
        (store::replay_call_summary): Likewise.
        * svalue.cc (svalue::can_merge_p): Likewise.
        (widening_svalue::eval_condition_without_cm): Likewise.
---
 gcc/analyzer/access-diagram.cc     |  2 +-
 gcc/analyzer/analyzer.cc           |  4 ++--
 gcc/analyzer/bounds-checking.cc    |  2 +-
 gcc/analyzer/constraint-manager.cc |  2 +-
 gcc/analyzer/diagnostic-manager.cc |  4 ++--
 gcc/analyzer/engine.cc             |  4 ++--
 gcc/analyzer/inlining-iterator.h   |  2 +-
 gcc/analyzer/ops.cc                |  2 +-
 gcc/analyzer/pending-diagnostic.h  |  4 ++--
 gcc/analyzer/region-model-asm.cc   |  2 +-
 gcc/analyzer/region-model.cc       | 14 +++++++-------
 gcc/analyzer/region.cc             |  2 +-
 gcc/analyzer/setjmp-longjmp.cc     |  2 +-
 gcc/analyzer/sm-fd.cc              |  2 +-
 gcc/analyzer/sm-malloc.cc          |  6 +++---
 gcc/analyzer/sm-taint.cc           |  2 +-
 gcc/analyzer/store.cc              |  8 ++++----
 gcc/analyzer/svalue.cc             |  4 ++--
 18 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/gcc/analyzer/access-diagram.cc b/gcc/analyzer/access-diagram.cc
index 6a3ad635f0c..9caafcdb55d 100644
--- a/gcc/analyzer/access-diagram.cc
+++ b/gcc/analyzer/access-diagram.cc
@@ -2192,7 +2192,7 @@ public:
   const theme &get_theme () const { return m_theme; }
 
 private:
-  /* Figure out all of the boundaries of interest when visualizing ths op.  */
+  /* Figure out all of the boundaries of interest when visualizing the op.  */
   std::unique_ptr<boundaries>
   find_boundaries () const
   {
diff --git a/gcc/analyzer/analyzer.cc b/gcc/analyzer/analyzer.cc
index 15c0c786a06..f58cfc93fc7 100644
--- a/gcc/analyzer/analyzer.cc
+++ b/gcc/analyzer/analyzer.cc
@@ -70,7 +70,7 @@ get_stmt_location (const gimple *stmt, function *fun)
 static tree
 fixup_tree_for_diagnostic_1 (tree expr, hash_set<tree> *visited);
 
-/* Attemp to generate a tree for the LHS of ASSIGN_STMT.
+/* Attempt to generate a tree for the LHS of ASSIGN_STMT.
    VISITED must be non-NULL; it is used to ensure termination.  */
 
 static tree
@@ -238,7 +238,7 @@ tree_to_json (tree node)
 
 /* Generate a JSON value for EVENT_ID.
    This is intended for debugging the analyzer rather than serialization and
-   thus is a string matching those seen in event messags (or null,
+   thus is a string matching those seen in event messages (or null,
    for unknown).  */
 
 std::unique_ptr<json::value>
diff --git a/gcc/analyzer/bounds-checking.cc b/gcc/analyzer/bounds-checking.cc
index f9b5165a7cb..c779c9b6c0f 100644
--- a/gcc/analyzer/bounds-checking.cc
+++ b/gcc/analyzer/bounds-checking.cc
@@ -253,7 +253,7 @@ protected:
   bit_range m_out_of_bounds_bits;
 };
 
-/* Abstract subclass to complaing about concrete out-of-bounds
+/* Abstract subclass to complain about concrete out-of-bounds
    past the end of the buffer.  */
 
 class concrete_past_the_end : public concrete_out_of_bounds
diff --git a/gcc/analyzer/constraint-manager.cc 
b/gcc/analyzer/constraint-manager.cc
index 22b8d402df0..57e98f9d119 100644
--- a/gcc/analyzer/constraint-manager.cc
+++ b/gcc/analyzer/constraint-manager.cc
@@ -2689,7 +2689,7 @@ constraint_manager::impossible_derived_conditions_p 
(const svalue *lhs,
                  && iter_binop->get_type ())
                if (iter_binop->get_arg1 ()->get_kind () == SK_CONSTANT)
                  {
-                   /* Try evalating EC_SVAL with LHS
+                   /* Try evaluating EC_SVAL with LHS
                       as the value of EC_SVAL's lhs, and see if it's
                       consistent with existing knowledge.  */
                    const svalue *subst_bin_op
diff --git a/gcc/analyzer/diagnostic-manager.cc 
b/gcc/analyzer/diagnostic-manager.cc
index cef1694b156..41b4c2a75a9 100644
--- a/gcc/analyzer/diagnostic-manager.cc
+++ b/gcc/analyzer/diagnostic-manager.cc
@@ -1410,7 +1410,7 @@ public:
   /* Handle interactions between the dedupe winners, so that some
      diagnostics can supercede others (of different kinds).
 
-     We want use-after-free to supercede use-of-unitialized-value,
+     We want use-after-free to supercede use-of-uninitialized-value,
      so that if we have these at the same stmt, we don't emit
      a use-of-uninitialized, just the use-after-free.  */
 
@@ -2948,7 +2948,7 @@ prune_frame (checker_path *path, int &idx)
    is disabled and will prune the diagnostic of all events within a
    system header, only keeping the entry and exit events to the header.
    This should be called after diagnostic_manager::prune_interproc_events
-   so that sucessive events [system header call, system header return]
+   so that successive events [system header call, system header return]
    are preserved thereafter.
 
    Given a diagnostics path diving into a system header in the form
diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc
index 907a36af52b..2c009a8ef7b 100644
--- a/gcc/analyzer/engine.cc
+++ b/gcc/analyzer/engine.cc
@@ -1402,7 +1402,7 @@ get_eh_outedge (const supernode &snode)
   return nullptr;
 }
 
-/* Given THROWN_ENODE, which expreses a throw or rethrow occurring at
+/* Given THROWN_ENODE, which expresses a throw or rethrow occurring at
    THROW_STMT, unwind intraprocedurally and interprocedurally to find
    the next eh_dispatch statement to handle exceptions, if any.
 
@@ -3269,7 +3269,7 @@ maybe_process_run_of_enodes (exploded_node *enode)
     return false;
 
   if (logger)
-    logger->log ("got run of %i bulk-mergable enodes going to SN: %i",
+    logger->log ("got run of %i bulk-mergeable enodes going to SN: %i",
                 enodes.length (), dst_snode->m_id);
 
   /* All of these enodes have a shared intraprocedural successor point
diff --git a/gcc/analyzer/inlining-iterator.h b/gcc/analyzer/inlining-iterator.h
index e672fc5aa10..223f5974f00 100644
--- a/gcc/analyzer/inlining-iterator.h
+++ b/gcc/analyzer/inlining-iterator.h
@@ -112,7 +112,7 @@ private:
    The early inliner runs before the analyzer, which can lead to confusing
    output.
 
-   Tne base fndecl and depth within a checker_event are from call strings
+   The base fndecl and depth within a checker_event are from call strings
    in program_points, which reflect the call strings after inlining.
    This class lets us offset the depth and fix up the reported fndecl and
    stack depth to better reflect the user's original code.  */
diff --git a/gcc/analyzer/ops.cc b/gcc/analyzer/ops.cc
index ae6d44bc8b8..898eaf56485 100644
--- a/gcc/analyzer/ops.cc
+++ b/gcc/analyzer/ops.cc
@@ -909,7 +909,7 @@ void
 call_and_return_op::execute (operation_context &op_ctxt) const
 {
   /* Can we turn this into an interprocedural call, and execute within
-     the called fuction?  */
+     the called function?  */
   const program_state &old_state  = op_ctxt.get_initial_state ();
   program_state dst_state (old_state);
   op_region_model_context ctxt (op_ctxt, dst_state);
diff --git a/gcc/analyzer/pending-diagnostic.h 
b/gcc/analyzer/pending-diagnostic.h
index dccdb8a3f68..900a229c19d 100644
--- a/gcc/analyzer/pending-diagnostic.h
+++ b/gcc/analyzer/pending-diagnostic.h
@@ -352,7 +352,7 @@ class pending_diagnostic
   }
 
   /* Precision-of-wording vfunc for describing an interprocedural call
-     carrying critial state for the diagnostic, from caller to callee.
+     carrying critical state for the diagnostic, from caller to callee.
 
      For example a double-free diagnostic might use:
      - "passing freed pointer 'ptr' in call to 'deallocator' from 'test'"
@@ -367,7 +367,7 @@ class pending_diagnostic
   }
 
   /* Precision-of-wording vfunc for describing an interprocedural return
-     within the diagnostic path that carries critial state for the
+     within the diagnostic path that carries critical state for the
      diagnostic, from callee back to caller.
 
      For example, a deref-of-unchecked-malloc diagnostic might use:
diff --git a/gcc/analyzer/region-model-asm.cc b/gcc/analyzer/region-model-asm.cc
index af1dc9e37ce..b993bb3684d 100644
--- a/gcc/analyzer/region-model-asm.cc
+++ b/gcc/analyzer/region-model-asm.cc
@@ -44,7 +44,7 @@ namespace ana {
    Specifically, we want to:
 
    (a) mark asm outputs and certain other regions as having been written to,
-       to avoid false postives from -Wanalyzer-use-of-uninitialized-value.
+       to avoid false positives from -Wanalyzer-use-of-uninitialized-value.
 
    (b) identify some of these stmts as "deterministic" so that we can
        write consistent outputs given consistent inputs, so that we can
diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc
index 9555f72c307..4145dbb2852 100644
--- a/gcc/analyzer/region-model.cc
+++ b/gcc/analyzer/region-model.cc
@@ -2621,7 +2621,7 @@ check_one_function_attr_null_terminated_string_arg (const 
gcall &call,
 }
 
 /* Check CALL a call to external function CALLEE_FNDECL for any uses
-   of __attribute__ ((null_terminated_string_arg)), compaining
+   of __attribute__ ((null_terminated_string_arg)), complaining
    to CTXT about any issues.
 
    Use RDWR_IDX for tracking uses of __attribute__ ((access, ....).  */
@@ -3326,7 +3326,7 @@ region_model::deref_rvalue (const svalue *ptr_sval, tree 
ptr_tree,
          {
          case POINTER_PLUS_EXPR:
            {
-             /* If we have a symbolic value expressing pointer arithmentic,
+             /* If we have a symbolic value expressing pointer arithmetic,
                 try to convert it to a suitable region.  */
              const region *parent_region
                = deref_rvalue (binop_sval->get_arg0 (), NULL_TREE, ctxt);
@@ -4655,7 +4655,7 @@ region_model::scan_for_null_terminator (const region *reg,
 
    Complain and return nullptr if:
    - the buffer pointed to isn't null-terminated
-   - the buffer pointed to has any uninitalized bytes before any 0-terminator
+   - the buffer pointed to has any uninitialized bytes before any 0-terminator
    - any of the reads aren't within the bounds of the underlying base region
 
    Otherwise, return a svalue for strlen of the buffer (*not* including
@@ -4683,7 +4683,7 @@ region_model::check_for_null_terminated_string_arg (const 
call_details &cd,
 
    Complain and return nullptr if:
    - the buffer pointed to isn't null-terminated
-   - the buffer pointed to has any uninitalized bytes before any 0-terminator
+   - the buffer pointed to has any uninitialized bytes before any 0-terminator
    - any of the reads aren't within the bounds of the underlying base region
 
    Otherwise, return a svalue.  This will be the number of bytes read
@@ -6619,7 +6619,7 @@ public:
   void visit_constant_svalue (const constant_svalue *sval) final override
   {
     /* At the point the analyzer runs, constant integer operands in a floating
-       point expression are already implictly converted to floating-points.
+       point expression are already implicitly converted to floating-points.
        Thus, we do prefer to report non-constants such that the diagnostic
        always reports a floating-point operand.  */
     tree type = sval->get_type ();
@@ -7339,7 +7339,7 @@ model_merger::mergeable_svalue_p (const svalue *sval) 
const
 {
   if (m_ext_state)
     {
-      /* Reject merging svalues that have non-purgable sm-state,
+      /* Reject merging svalues that have non-purgeable sm-state,
         to avoid falsely reporting memory leaks by merging them
         with something else.  For example, given a local var "p",
         reject the merger of a:
@@ -8557,7 +8557,7 @@ test_canonicalization_4 ()
 
 /* Assert that if we have two region_model instances
    with values VAL_A and VAL_B for EXPR that they are
-   mergable.  Write the merged model to *OUT_MERGED_MODEL,
+   mergeable.  Write the merged model to *OUT_MERGED_MODEL,
    and the merged svalue ptr to *OUT_MERGED_SVALUE.
    If VAL_A or VAL_B are nullptr_TREE, don't populate EXPR
    for that region_model.  */
diff --git a/gcc/analyzer/region.cc b/gcc/analyzer/region.cc
index b03c79ffa72..15ca2ed05e4 100644
--- a/gcc/analyzer/region.cc
+++ b/gcc/analyzer/region.cc
@@ -1102,7 +1102,7 @@ region::accept (visitor *v) const
     m_parent->accept (v);
 }
 
-/* Return true if this is a symbolic region for deferencing an
+/* Return true if this is a symbolic region for dereferencing an
    unknown ptr.
    We shouldn't attempt to bind values for this region (but
    can unbind values for other regions).  */
diff --git a/gcc/analyzer/setjmp-longjmp.cc b/gcc/analyzer/setjmp-longjmp.cc
index 7fe0033095e..d0cc8ff6bc4 100644
--- a/gcc/analyzer/setjmp-longjmp.cc
+++ b/gcc/analyzer/setjmp-longjmp.cc
@@ -315,7 +315,7 @@ region_model::on_longjmp (const gcall &longjmp_call, const 
gcall &setjmp_call,
       /* Decorate the return value from setjmp as being unmergeable,
         so that we don't attempt to merge states with it as zero
         with states in which it's nonzero, leading to a clean distinction
-        in the exploded_graph betweeen the first return and the second
+        in the exploded_graph between the first return and the second
         return.  */
       fake_retval_sval = m_mgr->get_or_create_unmergeable (fake_retval_sval);
 
diff --git a/gcc/analyzer/sm-fd.cc b/gcc/analyzer/sm-fd.cc
index 0da4cc5d9df..2a28151b991 100644
--- a/gcc/analyzer/sm-fd.cc
+++ b/gcc/analyzer/sm-fd.cc
@@ -205,7 +205,7 @@ public:
   /* A bound socket after a successful call to "listen" (stream or unknown).  
*/
   state_t m_listening_stream_socket;
 
-  /* (i) the new FD as a result of a succesful call to "accept" on a
+  /* (i) the new FD as a result of a successful call to "accept" on a
      listening socket (via a passive open), or
      (ii) an active socket after a successful call to "connect"
      (via an active open).  */
diff --git a/gcc/analyzer/sm-malloc.cc b/gcc/analyzer/sm-malloc.cc
index 2c036fc7d8b..72e6e28e233 100644
--- a/gcc/analyzer/sm-malloc.cc
+++ b/gcc/analyzer/sm-malloc.cc
@@ -1219,7 +1219,7 @@ public:
   /* Implementation of pending_diagnostic::supercedes_p for
      null-deref.
 
-     We want null-deref to supercede use-of-unitialized-value,
+     We want null-deref to supercede use-of-uninitialized-value,
      so that if we have these at the same stmt, we don't emit
      a use-of-uninitialized, just the null-deref.  */
 
@@ -1394,7 +1394,7 @@ public:
   /* Implementation of pending_diagnostic::supercedes_p for
      use_after_free.
 
-     We want use-after-free to supercede use-of-unitialized-value,
+     We want use-after-free to supercede use-of-uninitialized-value,
      so that if we have these at the same stmt, we don't emit
      a use-of-uninitialized, just the use-after-free.
      (this is because we fully purge information about freed
@@ -1633,7 +1633,7 @@ public:
        return false;
       }
 
-    /* Reject the warning if the check occurs within a macro defintion.
+    /* Reject the warning if the check occurs within a macro definition.
        This avoids false positives for such code as:
 
        #define throw_error \
diff --git a/gcc/analyzer/sm-taint.cc b/gcc/analyzer/sm-taint.cc
index 7015353fc24..6a3f3eadd83 100644
--- a/gcc/analyzer/sm-taint.cc
+++ b/gcc/analyzer/sm-taint.cc
@@ -926,7 +926,7 @@ public:
         diagnostic.  */
       return expansion_point_location_if_in_system_header (loc);
     else if (in_system_header_at (loc))
-      /* For events, we want to show the implemenation of the assert
+      /* For events, we want to show the implementation of the assert
         macro when we're describing them.  */
       return linemap_resolve_location (line_table, loc,
                                       LRK_SPELLING_LOCATION,
diff --git a/gcc/analyzer/store.cc b/gcc/analyzer/store.cc
index d198aec9d2b..a7f715171fd 100644
--- a/gcc/analyzer/store.cc
+++ b/gcc/analyzer/store.cc
@@ -2250,7 +2250,7 @@ binding_cluster::maybe_get_compound_binding 
(store_manager *mgr,
                 Add it to result_map, offsetting accordingly.  */
              result_map.insert (subrange, sval);
 
-             /* Clobber default_map, removing/trimming/spliting where
+             /* Clobber default_map, removing/trimming/splitting where
                 it overlaps with offset_concrete_key.  */
              default_map.remove_overlapping_bindings (mgr, subrange);
            }
@@ -2279,7 +2279,7 @@ binding_cluster::maybe_get_compound_binding 
(store_manager *mgr,
 
              result_map.insert (reg_subrange, overlap_sval);
 
-             /* Clobber default_map, removing/trimming/spliting where
+             /* Clobber default_map, removing/trimming/splitting where
                 it overlaps with overlap_concrete_key.  */
              default_map.remove_overlapping_bindings (mgr, reg_subrange);
            }
@@ -2443,7 +2443,7 @@ binding_cluster::can_merge_p (const binding_cluster 
*cluster_a,
        = mgr->get_svalue_manager ()->get_or_create_unknown_svalue (type);
 
       /* ...but reject the merger if this sval shouldn't be mergeable
-        (e.g. reject merging svalues that have non-purgable sm-state,
+        (e.g. reject merging svalues that have non-purgeable sm-state,
         to avoid falsely reporting memory leaks by merging them
         with something else).  */
       if (!bound_sval->can_merge_p (unknown_sval, sval_mgr, merger))
@@ -3851,7 +3851,7 @@ store::replay_call_summary (call_summary_replay &r,
   if (summary.m_called_unknown_fn)
     {
       /* A call to an external function occurred in the summary.
-        Hence we need to invalidate our knownledge of globals,
+        Hence we need to invalidate our knowledge of globals,
         escaped regions, etc.  */
       on_unknown_fncall (r.get_call_stmt (),
                         r.get_store_manager (),
diff --git a/gcc/analyzer/svalue.cc b/gcc/analyzer/svalue.cc
index 1c0041ab75b..f220fd0f389 100644
--- a/gcc/analyzer/svalue.cc
+++ b/gcc/analyzer/svalue.cc
@@ -337,7 +337,7 @@ svalue::can_merge_p (const svalue *other,
        return nullptr;
     }
 
-  /* Reject merging svalues that have non-purgable sm-state,
+  /* Reject merging svalues that have non-purgeable sm-state,
      to avoid falsely reporting memory leaks by merging them
      with something else.  */
   if (!merger->mergeable_svalue_p (this))
@@ -2191,7 +2191,7 @@ widening_svalue::eval_condition_without_cm (enum 
tree_code op,
        case LT_EXPR:
          {
            /* [BASE, +INF) OP RHS:
-              This is either true or false at +ve ininity,
+              This is either true or false at +ve infinity,
               It can be true for points X where X OP RHS, so we have either
               "false", or "unknown".  */
            tree base_op_rhs = fold_binary (op, boolean_type_node,
-- 
2.43.0

Reply via email to