]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
analyzer: Fix typos in various files
authorDhruv Chawla <dhruvc@nvidia.com>
Wed, 13 May 2026 10:46:00 +0000 (10:46 +0000)
committerDhruv Chawla <dhruvc@nvidia.com>
Sat, 30 May 2026 14:19:32 +0000 (19:49 +0530)
Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
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.

18 files changed:
gcc/analyzer/access-diagram.cc
gcc/analyzer/analyzer.cc
gcc/analyzer/bounds-checking.cc
gcc/analyzer/constraint-manager.cc
gcc/analyzer/diagnostic-manager.cc
gcc/analyzer/engine.cc
gcc/analyzer/inlining-iterator.h
gcc/analyzer/ops.cc
gcc/analyzer/pending-diagnostic.h
gcc/analyzer/region-model-asm.cc
gcc/analyzer/region-model.cc
gcc/analyzer/region.cc
gcc/analyzer/setjmp-longjmp.cc
gcc/analyzer/sm-fd.cc
gcc/analyzer/sm-malloc.cc
gcc/analyzer/sm-taint.cc
gcc/analyzer/store.cc
gcc/analyzer/svalue.cc

index 6a3ad635f0c0cc83cafc30d49f7f9be2d4d54a18..9caafcdb55d02d86d70d1c38ddd6dfbe79215371 100644 (file)
@@ -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
   {
index 15c0c786a06c512b8f3785bd4eee05715f375db6..f58cfc93fc7df1b01f1e5eebbdbece5166470053 100644 (file)
@@ -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>
index f9b5165a7cbccc373ee96d3df01d4c08ce7bbc9c..c779c9b6c0f31d0b88765c8885f7c01491dcc645 100644 (file)
@@ -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
index 22b8d402df01f87c775e1a4f1cb0da0518ca4798..57e98f9d119895e0921929e6a0e56cfe00183151 100644 (file)
@@ -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
index cef1694b156cc64121d9b003f41511f749d00df2..41b4c2a75a9fc2ce7b505c8e01bbcbd9de0cd77d 100644 (file)
@@ -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
index d31cb5d9d17837ca8c09f07ff0a4c2a0d384c58f..59cdcc51e6c956f34fdf1fdf9e3728f984a80c26 100644 (file)
@@ -1399,7 +1399,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.
 
@@ -3267,7 +3267,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
index e672fc5aa103b5ea50131bb7f8e291aee3d1ccb1..223f5974f00ad0f4745629a9f14bb7e296844264 100644 (file)
@@ -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.  */
index ae6d44bc8b83366cfb45086d2a23aae1c9acf378..898eaf56485df65af41eade2b43744f4901f61c7 100644 (file)
@@ -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);
index dccdb8a3f68931e38774f8d2ba77757406d204ef..900a229c19dc37747f6f27a99c5c4d7a30113e95 100644 (file)
@@ -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:
index af1dc9e37ce3dd55dd5acbd149a0c4a0803867e5..b993bb3684de30ea39494d616f903dcdb8ca6e64 100644 (file)
@@ -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
index 5e1a895b1504edb27b021590400f34878fd582c5..d88651fc33beaa536d02a9f98ca4090a3b032c18 100644 (file)
@@ -2622,7 +2622,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, ....).  */
@@ -3327,7 +3327,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);
@@ -4657,7 +4657,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
@@ -4685,7 +4685,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
@@ -6622,7 +6622,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 ();
@@ -7342,7 +7342,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:
@@ -8560,7 +8560,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.  */
index 61c82dacec23fd300ae5c7f82c471226ac6ae8ef..6f9e49468cdae2a2ec99ee9f30c6e10501364f84 100644 (file)
@@ -1225,7 +1225,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).  */
index 7fe0033095e0ebe80e808597c392f01fae58c3d3..d0cc8ff6bc4e09fbe79e64b29c4caf2c7d38b977 100644 (file)
@@ -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);
 
index 0da4cc5d9df4fed007285d56ce6350cb2300bdb5..2a28151b991c4669839aca3514db4790bda40fbb 100644 (file)
@@ -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).  */
index 2c036fc7d8bc417c81c3767f633d8c5f4b5b9785..72e6e28e233e5361aed5ed52c7cc5f380e96489c 100644 (file)
@@ -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 \
index 7015353fc24438ab45a6543d2de7496210c5115f..6a3f3eadd83f317d2bd5f3f30e04e786b620b6f3 100644 (file)
@@ -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,
index d25709516d9bc27704e76faeab3ce9818b78cd51..66cfd3ddddf5351b9711beb904948e9c3fea142b 100644 (file)
@@ -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))
@@ -4033,7 +4033,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 (),
index 6e031da62d3acae3a19820a794e7a68f0e26b428..f21fc4c586c5957f8c7f09869ad4d1a79f50fb70 100644 (file)
@@ -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))
@@ -2165,7 +2165,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,