LCOV - code coverage report
Current view: top level - gcc/diagnostics - diagnostic-info.h (source / functions) Coverage Total Hit
Test: gcc.info Lines: 100.0 % 11 11
Test Date: 2025-09-20 13:40:47 Functions: 100.0 % 1 1
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : /* Various declarations for language-independent diagnostics subroutines.
       2                 :             :    Copyright (C) 2000-2025 Free Software Foundation, Inc.
       3                 :             : 
       4                 :             : This file is part of GCC.
       5                 :             : 
       6                 :             : GCC is free software; you can redistribute it and/or modify it under
       7                 :             : the terms of the GNU General Public License as published by the Free
       8                 :             : Software Foundation; either version 3, or (at your option) any later
       9                 :             : version.
      10                 :             : 
      11                 :             : GCC is distributed in the hope that it will be useful, but WITHOUT ANY
      12                 :             : WARRANTY; without even the implied warranty of MERCHANTABILITY or
      13                 :             : FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      14                 :             : for more details.
      15                 :             : 
      16                 :             : You should have received a copy of the GNU General Public License
      17                 :             : along with GCC; see the file COPYING3.  If not see
      18                 :             : <http://www.gnu.org/licenses/>.  */
      19                 :             : 
      20                 :             : #ifndef GCC_DIAGNOSTICS_DIAGNOSTIC_INFO_H
      21                 :             : #define GCC_DIAGNOSTICS_DIAGNOSTIC_INFO_H
      22                 :             : 
      23                 :             : namespace diagnostics {
      24                 :             : 
      25                 :             : class metadata;
      26                 :             : 
      27                 :             : /* A diagnostic is described by the MESSAGE to send, the FILE and LINE of
      28                 :             :    its context and its KIND (ice, error, warning, note, ...)  See complete
      29                 :             :    list in diagnostics/kinds.def.  */
      30                 :             : 
      31                 :   205420844 : struct diagnostic_info
      32                 :             : {
      33                 :   102711163 :   diagnostic_info ()
      34                 :   102711163 :   : m_message (),
      35                 :   102711163 :     m_richloc (),
      36                 :   102711163 :     m_metadata (),
      37                 :   102711163 :     m_x_data (),
      38                 :   102711163 :     m_kind (),
      39                 :   102711163 :     m_option_id (),
      40                 :   102711163 :     m_iinfo ()
      41                 :   102711163 :   { }
      42                 :             : 
      43                 :             :   /* Text to be formatted.  */
      44                 :             :   text_info m_message;
      45                 :             : 
      46                 :             :   /* The location at which the diagnostic is to be reported.  */
      47                 :             :   rich_location *m_richloc;
      48                 :             : 
      49                 :             :   /* An optional bundle of metadata associated with the diagnostic
      50                 :             :      (or NULL).  */
      51                 :             :   const metadata *m_metadata;
      52                 :             : 
      53                 :             :   /* Auxiliary data for client.  */
      54                 :             :   void *m_x_data;
      55                 :             :   /* The kind of diagnostic it is about.  */
      56                 :             :   kind m_kind;
      57                 :             :   /* Which OPT_* directly controls this diagnostic.  */
      58                 :             :   option_id m_option_id;
      59                 :             : 
      60                 :             :   /* Inlining context containing locations for each call site along
      61                 :             :      the inlining stack.  */
      62                 :   102710422 :   struct inlining_info
      63                 :             :   {
      64                 :             :     /* Locations along the inlining stack.  */
      65                 :             :     auto_vec<location_t, 8> m_ilocs;
      66                 :             :     /* The abstract origin of the location.  */
      67                 :             :     void *m_ao;
      68                 :             :     /* Set if every M_ILOCS element is in a system header.  */
      69                 :             :     bool m_allsyslocs;
      70                 :             :   } m_iinfo;
      71                 :             : };
      72                 :             : 
      73                 :             : } // namespace diagnostics
      74                 :             : 
      75                 :             : #endif /* ! GCC_DIAGNOSTICS_DIAGNOSTIC_INFO_H */
        

Generated by: LCOV version 2.1-beta

LCOV profile is generated on x86_64 machine using following configure options: configure --disable-bootstrap --enable-coverage=opt --enable-languages=c,c++,fortran,go,jit,lto,rust,m2 --enable-host-shared. GCC test suite is run with the built compiler.