LCOV - code coverage report
Current view: top level - clang/AST - TypeNodes.def (source / functions) Hit Total Coverage
Test: clang.info Lines: 10 46 21.7 %
Date: 2016-01-31 12:01:00 Functions: 40 184 21.7 %

          Line data    Source code
       1             : //===-- TypeNodes.def - Metadata about Type AST nodes -----------*- C++ -*-===//
       2             : //
       3             : //                     The LLVM Compiler Infrastructure
       4             : //
       5             : // This file is distributed under the University of Illinois Open Source
       6             : // License. See LICENSE.TXT for details.
       7             : //
       8             : //===----------------------------------------------------------------------===//
       9             : //
      10             : //  This file defines the AST type info database. Each type node is
      11             : //  enumerated by providing its name (e.g., "Builtin" or "Enum") and
      12             : //  base class (e.g., "Type" or "TagType"). Depending on where in the
      13             : //  abstract syntax tree the type will show up, the enumeration uses
      14             : //  one of five different macros:
      15             : //
      16             : //    TYPE(Class, Base) - A type that can show up anywhere in the AST,
      17             : //    and might be dependent, canonical, or non-canonical. All clients
      18             : //    will need to understand these types.
      19             : //
      20             : //    ABSTRACT_TYPE(Class, Base) - An abstract class that shows up in
      21             : //    the type hierarchy but has no concrete instances.
      22             : //
      23             : //    NON_CANONICAL_TYPE(Class, Base) - A type that can show up
      24             : //    anywhere in the AST but will never be a part of a canonical
      25             : //    type. Clients that only need to deal with canonical types
      26             : //    (ignoring, e.g., typedefs and other type alises used for
      27             : //    pretty-printing) can ignore these types.
      28             : //
      29             : //    DEPENDENT_TYPE(Class, Base) - A type that will only show up
      30             : //    within a C++ template that has not been instantiated, e.g., a
      31             : //    type that is always dependent. Clients that do not need to deal
      32             : //    with uninstantiated C++ templates can ignore these types.
      33             : //
      34             : //    NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) - A type that
      35             : //    is non-canonical unless it is dependent.  Defaults to TYPE because
      36             : //    it is neither reliably dependent nor reliably non-canonical.
      37             : //
      38             : //  There is a sixth macro, independent of the others.  Most clients
      39             : //  will not need to use it.
      40             : //
      41             : //    LEAF_TYPE(Class) - A type that never has inner types.  Clients
      42             : //    which can operate on such types more efficiently may wish to do so.
      43             : //
      44             : //===----------------------------------------------------------------------===//
      45             : 
      46             : #ifndef ABSTRACT_TYPE
      47             : #  define ABSTRACT_TYPE(Class, Base) TYPE(Class, Base)
      48             : #endif
      49             : 
      50             : #ifndef NON_CANONICAL_TYPE
      51             : #  define NON_CANONICAL_TYPE(Class, Base) TYPE(Class, Base)
      52             : #endif
      53             : 
      54             : #ifndef DEPENDENT_TYPE
      55             : #  define DEPENDENT_TYPE(Class, Base) TYPE(Class, Base)
      56             : #endif
      57             : 
      58             : #ifndef NON_CANONICAL_UNLESS_DEPENDENT_TYPE
      59             : #  define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) TYPE(Class, Base)
      60             : #endif
      61             : 
      62         486 : TYPE(Builtin, Type)
      63           0 : TYPE(Complex, Type)
      64         108 : TYPE(Pointer, Type)
      65           0 : TYPE(BlockPointer, Type)
      66          18 : ABSTRACT_TYPE(Reference, Type)
      67          18 : TYPE(LValueReference, ReferenceType)
      68           0 : TYPE(RValueReference, ReferenceType)
      69           0 : TYPE(MemberPointer, Type)
      70          54 : ABSTRACT_TYPE(Array, Type)
      71           0 : TYPE(ConstantArray, ArrayType)
      72          54 : TYPE(IncompleteArray, ArrayType)
      73           0 : TYPE(VariableArray, ArrayType)
      74           0 : DEPENDENT_TYPE(DependentSizedArray, ArrayType)
      75           0 : DEPENDENT_TYPE(DependentSizedExtVector, Type)
      76           0 : TYPE(Vector, Type)
      77           0 : TYPE(ExtVector, VectorType)
      78         288 : ABSTRACT_TYPE(Function, Type)
      79         288 : TYPE(FunctionProto, FunctionType)
      80           0 : TYPE(FunctionNoProto, FunctionType)
      81           0 : DEPENDENT_TYPE(UnresolvedUsing, Type)
      82           0 : NON_CANONICAL_TYPE(Paren, Type)
      83           0 : NON_CANONICAL_TYPE(Typedef, Type)
      84           0 : NON_CANONICAL_TYPE(Adjusted, Type)
      85           0 : NON_CANONICAL_TYPE(Decayed, AdjustedType)
      86           0 : NON_CANONICAL_UNLESS_DEPENDENT_TYPE(TypeOfExpr, Type)
      87           0 : NON_CANONICAL_UNLESS_DEPENDENT_TYPE(TypeOf, Type)
      88           0 : NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Decltype, Type)
      89           0 : NON_CANONICAL_UNLESS_DEPENDENT_TYPE(UnaryTransform, Type)
      90         234 : ABSTRACT_TYPE(Tag, Type)
      91         234 : TYPE(Record, TagType)
      92           0 : TYPE(Enum, TagType)
      93           0 : NON_CANONICAL_TYPE(Elaborated, Type)
      94           0 : NON_CANONICAL_TYPE(Attributed, Type)
      95           0 : DEPENDENT_TYPE(TemplateTypeParm, Type)
      96           0 : NON_CANONICAL_TYPE(SubstTemplateTypeParm, Type)
      97           0 : DEPENDENT_TYPE(SubstTemplateTypeParmPack, Type)
      98           0 : NON_CANONICAL_UNLESS_DEPENDENT_TYPE(TemplateSpecialization, Type)
      99           0 : TYPE(Auto, Type)
     100           0 : DEPENDENT_TYPE(InjectedClassName, Type)
     101           0 : DEPENDENT_TYPE(DependentName, Type)
     102           0 : DEPENDENT_TYPE(DependentTemplateSpecialization, Type)
     103           0 : NON_CANONICAL_UNLESS_DEPENDENT_TYPE(PackExpansion, Type)
     104           0 : TYPE(ObjCObject, Type)
     105           0 : TYPE(ObjCInterface, ObjCObjectType)
     106           0 : TYPE(ObjCObjectPointer, Type)
     107           0 : TYPE(Atomic, Type)
     108             : 
     109             : #ifdef LAST_TYPE
     110             : LAST_TYPE(Atomic)
     111             : #undef LAST_TYPE
     112             : #endif
     113             : 
     114             : // These types are always leaves in the type hierarchy.
     115             : #ifdef LEAF_TYPE
     116             : LEAF_TYPE(Enum)
     117             : LEAF_TYPE(Builtin)
     118             : LEAF_TYPE(Record)
     119             : LEAF_TYPE(InjectedClassName)
     120             : LEAF_TYPE(ObjCInterface)
     121             : LEAF_TYPE(TemplateTypeParm)
     122             : #undef LEAF_TYPE
     123             : #endif
     124             : 
     125             : #undef NON_CANONICAL_UNLESS_DEPENDENT_TYPE
     126             : #undef DEPENDENT_TYPE
     127             : #undef NON_CANONICAL_TYPE
     128             : #undef ABSTRACT_TYPE
     129             : #undef TYPE

Generated by: LCOV version 1.11