Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/include/clang/Basic/OperatorKinds.def
Line
Count
Source
1
13.4k
//===--- OperatorKinds.def - C++ Overloaded Operator Database ---*- C++ -*-===//
2
13.4k
//
3
13.4k
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
13.4k
// See https://llvm.org/LICENSE.txt for license information.
5
13.4k
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
13.4k
//
7
13.4k
//===----------------------------------------------------------------------===//
8
13.4k
//
9
13.4k
// This file defines the OverloadedOperator database, which includes
10
13.4k
// all of the overloadable C++ operators.
11
13.4k
//
12
13.4k
//===----------------------------------------------------------------------===//
13
13.4k
//
14
13.4k
/// @file OperatorKinds.def
15
13.4k
///
16
13.4k
/// In this file, each of the overloadable C++ operators is enumerated
17
13.4k
/// with either the OVERLOADED_OPERATOR or OVERLOADED_OPERATOR_MULTI
18
13.4k
/// macro, each of which can be specified by the code including this
19
13.4k
/// file. OVERLOADED_OPERATOR is used for single-token operators
20
13.4k
/// (e.g., "+"), and has six arguments:
21
13.4k
///
22
13.4k
/// Name: The name of the token. OO_Name will be the name of the
23
13.4k
/// corresponding enumerator in OverloadedOperatorKind in
24
13.4k
/// OperatorKinds.h.
25
13.4k
///
26
13.4k
/// Spelling: A string that provides a canonical spelling for the
27
13.4k
/// operator, e.g., "operator+".
28
13.4k
///
29
13.4k
/// Token: The name of the token that specifies the operator, e.g.,
30
13.4k
/// "plus" for operator+ or "greatergreaterequal" for
31
13.4k
/// "operator>>=". With a "kw_" prefix, the token name can be used as
32
13.4k
/// an enumerator into the TokenKind enumeration.
33
13.4k
///
34
13.4k
/// Unary: True if the operator can be declared as a unary operator.
35
13.4k
///
36
13.4k
/// Binary: True if the operator can be declared as a binary
37
13.4k
/// operator. Note that some operators (e.g., "operator+" and
38
13.4k
/// "operator*") can be both unary and binary.
39
13.4k
///
40
13.4k
/// MemberOnly: True if this operator can only be declared as a
41
13.4k
/// non-static member function. False if the operator can be both a
42
13.4k
/// non-member function and a non-static member function.
43
13.4k
///
44
13.4k
/// OVERLOADED_OPERATOR_MULTI is used to enumerate the multi-token
45
13.4k
/// overloaded operator names, e.g., "operator delete []". The macro
46
13.4k
/// has all of the parameters of OVERLOADED_OPERATOR except Token,
47
13.4k
/// which is omitted.
48
13.4k
49
#ifndef OVERLOADED_OPERATOR
50
#  define OVERLOADED_OPERATOR(Name,Spelling,Token,Unary,Binary,MemberOnly)
51
#endif
52
53
#ifndef OVERLOADED_OPERATOR_MULTI
54
#  define OVERLOADED_OPERATOR_MULTI(Name,Spelling,Unary,Binary,MemberOnly) \
55
4.51M
    OVERLOADED_OPERATOR(Name,Spelling,unknown,Unary,Binary,MemberOnly)
56
#endif
57
58
642k
OVERLOADED_OPERATOR_MULTI(New            , "new"                      , true , true , false)
59
642k
OVERLOADED_OPERATOR_MULTI(Delete         , "delete"                   , true , true , false)
60
641k
OVERLOADED_OPERATOR_MULTI(Array_New      , "new[]"                    , true , true , false)
61
641k
OVERLOADED_OPERATOR_MULTI(Array_Delete   , "delete[]"                 , true , true , false)
62
750k
OVERLOADED_OPERATOR(Plus                 , "+"   , plus               , true , true , false)
63
741k
OVERLOADED_OPERATOR(Minus                , "-"   , minus              , true , true , false)
64
747k
OVERLOADED_OPERATOR(Star                 , "*"   , star               , true , true , false)
65
736k
OVERLOADED_OPERATOR(Slash                , "/"   , slash              , false, true , false)
66
736k
OVERLOADED_OPERATOR(Percent              , "%"   , percent            , false, true , false)
67
736k
OVERLOADED_OPERATOR(Caret                , "^"   , caret              , false, true , false)
68
738k
OVERLOADED_OPERATOR(Amp                  , "&"   , amp                , true , true , false)
69
736k
OVERLOADED_OPERATOR(Pipe                 , "|"   , pipe               , false, true , false)
70
736k
OVERLOADED_OPERATOR(Tilde                , "~"   , tilde              , true , false, false)
71
736k
OVERLOADED_OPERATOR(Exclaim              , "!"   , exclaim            , true , false, false)
72
805k
OVERLOADED_OPERATOR(Equal                , "="   , equal              , false, true , true)
73
744k
OVERLOADED_OPERATOR(Less                 , "<"   , less               , false, true , false)
74
743k
OVERLOADED_OPERATOR(Greater              , ">"   , greater            , false, true , false)
75
742k
OVERLOADED_OPERATOR(PlusEqual            , "+="  , plusequal          , false, true , false)
76
739k
OVERLOADED_OPERATOR(MinusEqual           , "-="  , minusequal         , false, true , false)
77
737k
OVERLOADED_OPERATOR(StarEqual            , "*="  , starequal          , false, true , false)
78
736k
OVERLOADED_OPERATOR(SlashEqual           , "/="  , slashequal         , false, true , false)
79
736k
OVERLOADED_OPERATOR(PercentEqual         , "%="  , percentequal       , false, true , false)
80
738k
OVERLOADED_OPERATOR(CaretEqual           , "^="  , caretequal         , false, true , false)
81
738k
OVERLOADED_OPERATOR(AmpEqual             , "&="  , ampequal           , false, true , false)
82
738k
OVERLOADED_OPERATOR(PipeEqual            , "|="  , pipeequal          , false, true , false)
83
750k
OVERLOADED_OPERATOR(LessLess             , "<<"  , lessless           , false, true , false)
84
747k
OVERLOADED_OPERATOR(GreaterGreater       , ">>"  , greatergreater     , false, true , false)
85
736k
OVERLOADED_OPERATOR(LessLessEqual        , "<<=" , lesslessequal      , false, true , false)
86
736k
OVERLOADED_OPERATOR(GreaterGreaterEqual  , ">>=" , greatergreaterequal, false, true , false)
87
757k
OVERLOADED_OPERATOR(EqualEqual           , "=="  , equalequal         , false, true , false)
88
756k
OVERLOADED_OPERATOR(ExclaimEqual         , "!="  , exclaimequal       , false, true , false)
89
743k
OVERLOADED_OPERATOR(LessEqual            , "<="  , lessequal          , false, true , false)
90
743k
OVERLOADED_OPERATOR(GreaterEqual         , ">="  , greaterequal       , false, true , false)
91
735k
OVERLOADED_OPERATOR(Spaceship            , "<=>" , spaceship          , false, true , false)
92
735k
OVERLOADED_OPERATOR(AmpAmp               , "&&"  , ampamp             , false, true , false)
93
735k
OVERLOADED_OPERATOR(PipePipe             , "||"  , pipepipe           , false, true , false)
94
751k
OVERLOADED_OPERATOR(PlusPlus             , "++"  , plusplus           , true , true , false)
95
743k
OVERLOADED_OPERATOR(MinusMinus           , "--"  , minusminus         , true , true , false)
96
735k
OVERLOADED_OPERATOR(Comma                , ","   , comma              , false, true , false)
97
735k
OVERLOADED_OPERATOR(ArrowStar            , "->*" , arrowstar          , false, true , false)
98
740k
OVERLOADED_OPERATOR(Arrow                , "->"  , arrow              , true , false, true)
99
658k
OVERLOADED_OPERATOR_MULTI(Call           , "()"                       , true , true , true)
100
642k
OVERLOADED_OPERATOR_MULTI(Subscript      , "[]"                       , false, true , true)
101
98.3k
// ?: can *not* be overloaded, but we need the overload
102
98.3k
// resolution machinery for it.
103
641k
OVERLOADED_OPERATOR_MULTI(Conditional    , "?"                        , false, true , false)
104
735k
OVERLOADED_OPERATOR(Coawait              , "co_await", kw_co_await    , true , false, false)
105
93.9k
106
93.9k
#undef OVERLOADED_OPERATOR_MULTI
107
93.9k
#undef OVERLOADED_OPERATOR