Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/include/clang/AST/NonTrivialTypeVisitor.h
Line
Count
Source (jump to first uncovered line)
1
//===-- NonTrivialTypeVisitor.h - Visitor for non-trivial Types *- C++ --*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
//  This file defines the visitor classes that are used to traverse non-trivial
10
//  structs.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CLANG_NON_TRIVIAL_TYPE_VISITOR_H
15
#define LLVM_CLANG_NON_TRIVIAL_TYPE_VISITOR_H
16
17
#include "clang/AST/Type.h"
18
19
namespace clang {
20
21
template <class Derived, class RetTy = void> struct DestructedTypeVisitor {
22
517
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
517
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
517
                                     std::forward<Ts>(Args)...);
25
517
  }
CGNonTrivialStruct.cpp:void clang::DestructedTypeVisitor<(anonymous namespace)::GenDestructorFuncName, void>::visit<clang::FieldDecl const*&, clang::CharUnits&>(clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&)
Line
Count
Source
22
274
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
274
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
274
                                     std::forward<Ts>(Args)...);
25
274
  }
CGNonTrivialStruct.cpp:void clang::DestructedTypeVisitor<(anonymous namespace)::GenDestructor, void>::visit<clang::FieldDecl const*&, clang::CharUnits&, std::__1::array<clang::CodeGen::Address, 1ul>&>(clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&, std::__1::array<clang::CodeGen::Address, 1ul>&&&)
Line
Count
Source
22
97
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
97
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
97
                                     std::forward<Ts>(Args)...);
25
97
  }
SemaDecl.cpp:void clang::DestructedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionDestructedTypeVisitor, void>::visit<std::nullptr_t, bool>(clang::QualType, std::nullptr_t&&, bool&&)
Line
Count
Source
22
37
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
37
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
37
                                     std::forward<Ts>(Args)...);
25
37
  }
SemaDecl.cpp:void clang::DestructedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionDestructedTypeVisitor, void>::visit<clang::FieldDecl const*&, bool&>(clang::QualType, clang::FieldDecl const*&&&, bool&&&)
Line
Count
Source
22
109
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
109
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
109
                                     std::forward<Ts>(Args)...);
25
109
  }
26
27
  template <class... Ts>
28
  RetTy visitWithKind(QualType::DestructionKind DK, QualType FT,
29
499
                      Ts &&... Args) {
30
499
    switch (DK) {
31
499
    case QualType::DK_objc_strong_lifetime:
32
189
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
33
499
    case QualType::DK_nontrivial_c_struct:
34
89
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
35
499
    case QualType::DK_none:
36
154
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
37
499
    case QualType::DK_cxx_destructor:
38
0
      return asDerived().visitCXXDestructor(FT, std::forward<Ts>(Args)...);
39
499
    case QualType::DK_objc_weak_lifetime:
40
67
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
41
0
    }
42
0
43
0
    llvm_unreachable("unknown destruction kind");
44
0
  }
CGNonTrivialStruct.cpp:void clang::DestructedTypeVisitor<(anonymous namespace)::GenDestructorFuncName, void>::visitWithKind<clang::FieldDecl const*&, clang::CharUnits&>(clang::QualType::DestructionKind, clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&)
Line
Count
Source
29
262
                      Ts &&... Args) {
30
262
    switch (DK) {
31
262
    case QualType::DK_objc_strong_lifetime:
32
100
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
33
262
    case QualType::DK_nontrivial_c_struct:
34
26
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
35
262
    case QualType::DK_none:
36
111
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
37
262
    case QualType::DK_cxx_destructor:
38
0
      return asDerived().visitCXXDestructor(FT, std::forward<Ts>(Args)...);
39
262
    case QualType::DK_objc_weak_lifetime:
40
25
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
41
0
    }
42
0
43
0
    llvm_unreachable("unknown destruction kind");
44
0
  }
CGNonTrivialStruct.cpp:void clang::DestructedTypeVisitor<(anonymous namespace)::GenDestructor, void>::visitWithKind<clang::FieldDecl const*&, clang::CharUnits&, std::__1::array<clang::CodeGen::Address, 1ul>&>(clang::QualType::DestructionKind, clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&, std::__1::array<clang::CodeGen::Address, 1ul>&&&)
Line
Count
Source
29
91
                      Ts &&... Args) {
30
91
    switch (DK) {
31
91
    case QualType::DK_objc_strong_lifetime:
32
34
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
33
91
    case QualType::DK_nontrivial_c_struct:
34
8
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
35
91
    case QualType::DK_none:
36
43
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
37
91
    case QualType::DK_cxx_destructor:
38
0
      return asDerived().visitCXXDestructor(FT, std::forward<Ts>(Args)...);
39
91
    case QualType::DK_objc_weak_lifetime:
40
6
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
41
0
    }
42
0
43
0
    llvm_unreachable("unknown destruction kind");
44
0
  }
SemaDecl.cpp:void clang::DestructedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionDestructedTypeVisitor, void>::visitWithKind<clang::FieldDecl const*&, bool&>(clang::QualType::DestructionKind, clang::QualType, clang::FieldDecl const*&&&, bool&&&)
Line
Count
Source
29
146
                      Ts &&... Args) {
30
146
    switch (DK) {
31
146
    case QualType::DK_objc_strong_lifetime:
32
55
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
33
146
    case QualType::DK_nontrivial_c_struct:
34
55
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
35
146
    case QualType::DK_none:
36
0
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
37
146
    case QualType::DK_cxx_destructor:
38
0
      return asDerived().visitCXXDestructor(FT, std::forward<Ts>(Args)...);
39
146
    case QualType::DK_objc_weak_lifetime:
40
36
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
41
0
    }
42
0
43
0
    llvm_unreachable("unknown destruction kind");
44
0
  }
45
46
1.12k
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DestructedTypeVisitor<(anonymous namespace)::GenDestructorFuncName, void>::asDerived()
Line
Count
Source
46
536
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DestructedTypeVisitor<(anonymous namespace)::GenDestructor, void>::asDerived()
Line
Count
Source
46
188
  Derived &asDerived() { return static_cast<Derived &>(*this); }
SemaDecl.cpp:clang::DestructedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionDestructedTypeVisitor, void>::asDerived()
Line
Count
Source
46
401
  Derived &asDerived() { return static_cast<Derived &>(*this); }
47
};
48
49
template <class Derived, class RetTy = void>
50
struct DefaultInitializedTypeVisitor {
51
220
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
220
    return asDerived().visitWithKind(
53
220
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
220
        std::forward<Ts>(Args)...);
55
220
  }
CGNonTrivialStruct.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::GenDefaultInitialize, void>::visit<std::nullptr_t, clang::CharUnits, std::__1::array<clang::CodeGen::Address, 1ul> >(clang::QualType, std::nullptr_t&&, clang::CharUnits&&, std::__1::array<clang::CodeGen::Address, 1ul>&&)
Line
Count
Source
51
31
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
31
    return asDerived().visitWithKind(
53
31
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
31
        std::forward<Ts>(Args)...);
55
31
  }
CGNonTrivialStruct.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::GenDefaultInitializeFuncName, void>::visit<clang::FieldDecl const*&, clang::CharUnits&>(clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&)
Line
Count
Source
51
93
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
93
    return asDerived().visitWithKind(
53
93
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
93
        std::forward<Ts>(Args)...);
55
93
  }
CGNonTrivialStruct.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::GenDefaultInitialize, void>::visit<clang::FieldDecl const*&, clang::CharUnits&, std::__1::array<clang::CodeGen::Address, 1ul>&>(clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&, std::__1::array<clang::CodeGen::Address, 1ul>&&&)
Line
Count
Source
51
34
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
34
    return asDerived().visitWithKind(
53
34
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
34
        std::forward<Ts>(Args)...);
55
34
  }
SemaChecking.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::SearchNonTrivialToInitializeField, void>::visit<clang::SourceLocation>(clang::QualType, clang::SourceLocation&&)
Line
Count
Source
51
14
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
14
    return asDerived().visitWithKind(
53
14
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
14
        std::forward<Ts>(Args)...);
55
14
  }
SemaChecking.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::SearchNonTrivialToInitializeField, void>::visit<clang::SourceLocation&>(clang::QualType, clang::SourceLocation&&&)
Line
Count
Source
51
2
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
2
    return asDerived().visitWithKind(
53
2
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
2
        std::forward<Ts>(Args)...);
55
2
  }
SemaDecl.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionDefaultInitializeVisitor, void>::visit<std::nullptr_t, bool>(clang::QualType, std::nullptr_t&&, bool&&)
Line
Count
Source
51
13
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
13
    return asDerived().visitWithKind(
53
13
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
13
        std::forward<Ts>(Args)...);
55
13
  }
SemaDecl.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionDefaultInitializeVisitor, void>::visit<clang::FieldDecl const*&, bool&>(clang::QualType, clang::FieldDecl const*&&&, bool&&&)
Line
Count
Source
51
33
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
33
    return asDerived().visitWithKind(
53
33
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
33
        std::forward<Ts>(Args)...);
55
33
  }
56
57
  template <class... Ts>
58
  RetTy visitWithKind(QualType::PrimitiveDefaultInitializeKind PDIK,
59
216
                      QualType FT, Ts &&... Args) {
60
216
    switch (PDIK) {
61
216
    case QualType::PDIK_ARCStrong:
62
64
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
63
216
    case QualType::PDIK_ARCWeak:
64
31
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
65
216
    case QualType::PDIK_Struct:
66
66
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
67
216
    case QualType::PDIK_Trivial:
68
55
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
69
0
    }
70
0
71
0
    llvm_unreachable("unknown default-initialize kind");
72
0
  }
CGNonTrivialStruct.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::GenDefaultInitialize, void>::visitWithKind<clang::FieldDecl const*&, clang::CharUnits&, std::__1::array<clang::CodeGen::Address, 1ul>&>(clang::QualType::PrimitiveDefaultInitializeKind, clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&, std::__1::array<clang::CodeGen::Address, 1ul>&&&)
Line
Count
Source
59
63
                      QualType FT, Ts &&... Args) {
60
63
    switch (PDIK) {
61
63
    case QualType::PDIK_ARCStrong:
62
9
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
63
63
    case QualType::PDIK_ARCWeak:
64
5
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
65
63
    case QualType::PDIK_Struct:
66
37
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
67
63
    case QualType::PDIK_Trivial:
68
12
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
69
0
    }
70
0
71
0
    llvm_unreachable("unknown default-initialize kind");
72
0
  }
CGNonTrivialStruct.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::GenDefaultInitializeFuncName, void>::visitWithKind<clang::FieldDecl const*&, clang::CharUnits&>(clang::QualType::PrimitiveDefaultInitializeKind, clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&)
Line
Count
Source
59
93
                      QualType FT, Ts &&... Args) {
60
93
    switch (PDIK) {
61
93
    case QualType::PDIK_ARCStrong:
62
34
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
63
93
    case QualType::PDIK_ARCWeak:
64
12
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
65
93
    case QualType::PDIK_Struct:
66
10
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
67
93
    case QualType::PDIK_Trivial:
68
37
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
69
0
    }
70
0
71
0
    llvm_unreachable("unknown default-initialize kind");
72
0
  }
SemaChecking.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::SearchNonTrivialToInitializeField, void>::visitWithKind<clang::SourceLocation&>(clang::QualType::PrimitiveDefaultInitializeKind, clang::QualType, clang::SourceLocation&&&)
Line
Count
Source
59
14
                      QualType FT, Ts &&... Args) {
60
14
    switch (PDIK) {
61
14
    case QualType::PDIK_ARCStrong:
62
4
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
63
14
    case QualType::PDIK_ARCWeak:
64
2
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
65
14
    case QualType::PDIK_Struct:
66
2
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
67
14
    case QualType::PDIK_Trivial:
68
6
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
69
0
    }
70
0
71
0
    llvm_unreachable("unknown default-initialize kind");
72
0
  }
SemaDecl.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionDefaultInitializeVisitor, void>::visitWithKind<clang::FieldDecl const*&, bool&>(clang::QualType::PrimitiveDefaultInitializeKind, clang::QualType, clang::FieldDecl const*&&&, bool&&&)
Line
Count
Source
59
46
                      QualType FT, Ts &&... Args) {
60
46
    switch (PDIK) {
61
46
    case QualType::PDIK_ARCStrong:
62
17
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
63
46
    case QualType::PDIK_ARCWeak:
64
12
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
65
46
    case QualType::PDIK_Struct:
66
17
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
67
46
    case QualType::PDIK_Trivial:
68
0
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
69
0
    }
70
0
71
0
    llvm_unreachable("unknown default-initialize kind");
72
0
  }
73
74
487
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DefaultInitializedTypeVisitor<(anonymous namespace)::GenDefaultInitialize, void>::asDerived()
Line
Count
Source
74
128
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DefaultInitializedTypeVisitor<(anonymous namespace)::GenDefaultInitializeFuncName, void>::asDerived()
Line
Count
Source
74
186
  Derived &asDerived() { return static_cast<Derived &>(*this); }
SemaChecking.cpp:clang::DefaultInitializedTypeVisitor<(anonymous namespace)::SearchNonTrivialToInitializeField, void>::asDerived()
Line
Count
Source
74
48
  Derived &asDerived() { return static_cast<Derived &>(*this); }
SemaDecl.cpp:clang::DefaultInitializedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionDefaultInitializeVisitor, void>::asDerived()
Line
Count
Source
74
125
  Derived &asDerived() { return static_cast<Derived &>(*this); }
75
};
76
77
template <class Derived, bool IsMove, class RetTy = void>
78
struct CopiedTypeVisitor {
79
519
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
519
    QualType::PrimitiveCopyKind PCK =
81
519
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()116
82
519
               : 
FT.isNonTrivialToPrimitiveCopy()403
;
83
519
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
519
  }
CGNonTrivialStruct.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::GenBinaryFuncName<false>, false, void>::visit<clang::FieldDecl const*&, clang::CharUnits&>(clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&)
Line
Count
Source
79
174
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
174
    QualType::PrimitiveCopyKind PCK =
81
174
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
82
174
               : FT.isNonTrivialToPrimitiveCopy();
83
174
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
174
  }
CGNonTrivialStruct.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::GenCopyConstructor, false, void>::visit<clang::FieldDecl const*&, clang::CharUnits&, std::__1::array<clang::CodeGen::Address, 2ul>&>(clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&, std::__1::array<clang::CodeGen::Address, 2ul>&&&)
Line
Count
Source
79
79
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
79
    QualType::PrimitiveCopyKind PCK =
81
79
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
82
79
               : FT.isNonTrivialToPrimitiveCopy();
83
79
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
79
  }
CGNonTrivialStruct.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::GenCopyAssignment, false, void>::visit<clang::FieldDecl const*&, clang::CharUnits&, std::__1::array<clang::CodeGen::Address, 2ul>&>(clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&, std::__1::array<clang::CodeGen::Address, 2ul>&&&)
Line
Count
Source
79
24
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
24
    QualType::PrimitiveCopyKind PCK =
81
24
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
82
24
               : FT.isNonTrivialToPrimitiveCopy();
83
24
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
24
  }
CGNonTrivialStruct.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::GenBinaryFuncName<true>, true, void>::visit<clang::FieldDecl const*&, clang::CharUnits&>(clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&)
Line
Count
Source
79
70
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
70
    QualType::PrimitiveCopyKind PCK =
81
70
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
82
70
               : 
FT.isNonTrivialToPrimitiveCopy()0
;
83
70
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
70
  }
CGNonTrivialStruct.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::GenMoveConstructor, true, void>::visit<clang::FieldDecl const*&, clang::CharUnits&, std::__1::array<clang::CodeGen::Address, 2ul>&>(clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&, std::__1::array<clang::CodeGen::Address, 2ul>&&&)
Line
Count
Source
79
24
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
24
    QualType::PrimitiveCopyKind PCK =
81
24
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
82
24
               : 
FT.isNonTrivialToPrimitiveCopy()0
;
83
24
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
24
  }
CGNonTrivialStruct.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::GenMoveAssignment, true, void>::visit<clang::FieldDecl const*&, clang::CharUnits&, std::__1::array<clang::CodeGen::Address, 2ul>&>(clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&, std::__1::array<clang::CodeGen::Address, 2ul>&&&)
Line
Count
Source
79
22
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
22
    QualType::PrimitiveCopyKind PCK =
81
22
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
82
22
               : 
FT.isNonTrivialToPrimitiveCopy()0
;
83
22
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
22
  }
SemaChecking.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::SearchNonTrivialToCopyField, false, void>::visit<clang::SourceLocation>(clang::QualType, clang::SourceLocation&&)
Line
Count
Source
79
14
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
14
    QualType::PrimitiveCopyKind PCK =
81
14
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
82
14
               : FT.isNonTrivialToPrimitiveCopy();
83
14
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
14
  }
SemaChecking.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::SearchNonTrivialToCopyField, false, void>::visit<clang::SourceLocation&>(clang::QualType, clang::SourceLocation&&&)
Line
Count
Source
79
2
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
2
    QualType::PrimitiveCopyKind PCK =
81
2
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
82
2
               : FT.isNonTrivialToPrimitiveCopy();
83
2
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
2
  }
SemaDecl.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionCopyVisitor, false, void>::visit<std::nullptr_t, bool>(clang::QualType, std::nullptr_t&&, bool&&)
Line
Count
Source
79
29
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
29
    QualType::PrimitiveCopyKind PCK =
81
29
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
82
29
               : FT.isNonTrivialToPrimitiveCopy();
83
29
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
29
  }
SemaDecl.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionCopyVisitor, false, void>::visit<clang::FieldDecl const*&, bool&>(clang::QualType, clang::FieldDecl const*&&&, bool&&&)
Line
Count
Source
79
81
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
81
    QualType::PrimitiveCopyKind PCK =
81
81
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
82
81
               : FT.isNonTrivialToPrimitiveCopy();
83
81
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
81
  }
85
86
  template <class... Ts>
87
  RetTy visitWithKind(QualType::PrimitiveCopyKind PCK, QualType FT,
88
513
                      Ts &&... Args) {
89
513
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
513
91
513
    switch (PCK) {
92
513
    case QualType::PCK_ARCStrong:
93
179
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
513
    case QualType::PCK_ARCWeak:
95
73
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
513
    case QualType::PCK_Struct:
97
81
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
513
    case QualType::PCK_Trivial:
99
162
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
513
    case QualType::PCK_VolatileTrivial:
101
18
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
0
    }
103
0
104
0
    llvm_unreachable("unknown primitive copy kind");
105
0
  }
CGNonTrivialStruct.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::GenBinaryFuncName<false>, false, void>::visitWithKind<clang::FieldDecl const*&, clang::CharUnits&>(clang::QualType::PrimitiveCopyKind, clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&)
Line
Count
Source
88
172
                      Ts &&... Args) {
89
172
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
172
91
172
    switch (PCK) {
92
172
    case QualType::PCK_ARCStrong:
93
61
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
172
    case QualType::PCK_ARCWeak:
95
18
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
172
    case QualType::PCK_Struct:
97
11
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
172
    case QualType::PCK_Trivial:
99
74
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
172
    case QualType::PCK_VolatileTrivial:
101
8
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
0
    }
103
0
104
0
    llvm_unreachable("unknown primitive copy kind");
105
0
  }
CGNonTrivialStruct.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::GenCopyConstructor, false, void>::visitWithKind<clang::FieldDecl const*&, clang::CharUnits&, std::__1::array<clang::CodeGen::Address, 2ul>&>(clang::QualType::PrimitiveCopyKind, clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&, std::__1::array<clang::CodeGen::Address, 2ul>&&&)
Line
Count
Source
88
77
                      Ts &&... Args) {
89
77
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
77
91
77
    switch (PCK) {
92
77
    case QualType::PCK_ARCStrong:
93
25
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
77
    case QualType::PCK_ARCWeak:
95
5
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
77
    case QualType::PCK_Struct:
97
7
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
77
    case QualType::PCK_Trivial:
99
32
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
77
    case QualType::PCK_VolatileTrivial:
101
8
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
0
    }
103
0
104
0
    llvm_unreachable("unknown primitive copy kind");
105
0
  }
CGNonTrivialStruct.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::GenCopyAssignment, false, void>::visitWithKind<clang::FieldDecl const*&, clang::CharUnits&, std::__1::array<clang::CodeGen::Address, 2ul>&>(clang::QualType::PrimitiveCopyKind, clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&, std::__1::array<clang::CodeGen::Address, 2ul>&&&)
Line
Count
Source
88
24
                      Ts &&... Args) {
89
24
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
24
91
24
    switch (PCK) {
92
24
    case QualType::PCK_ARCStrong:
93
8
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
24
    case QualType::PCK_ARCWeak:
95
4
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
24
    case QualType::PCK_Struct:
97
4
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
24
    case QualType::PCK_Trivial:
99
8
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
24
    case QualType::PCK_VolatileTrivial:
101
0
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
0
    }
103
0
104
0
    llvm_unreachable("unknown primitive copy kind");
105
0
  }
CGNonTrivialStruct.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::GenBinaryFuncName<true>, true, void>::visitWithKind<clang::FieldDecl const*&, clang::CharUnits&>(clang::QualType::PrimitiveCopyKind, clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&)
Line
Count
Source
88
70
                      Ts &&... Args) {
89
70
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
70
91
70
    switch (PCK) {
92
70
    case QualType::PCK_ARCStrong:
93
26
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
70
    case QualType::PCK_ARCWeak:
95
8
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
70
    case QualType::PCK_Struct:
97
8
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
70
    case QualType::PCK_Trivial:
99
28
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
70
    case QualType::PCK_VolatileTrivial:
101
0
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
0
    }
103
0
104
0
    llvm_unreachable("unknown primitive copy kind");
105
0
  }
CGNonTrivialStruct.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::GenMoveConstructor, true, void>::visitWithKind<clang::FieldDecl const*&, clang::CharUnits&, std::__1::array<clang::CodeGen::Address, 2ul>&>(clang::QualType::PrimitiveCopyKind, clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&, std::__1::array<clang::CodeGen::Address, 2ul>&&&)
Line
Count
Source
88
24
                      Ts &&... Args) {
89
24
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
24
91
24
    switch (PCK) {
92
24
    case QualType::PCK_ARCStrong:
93
8
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
24
    case QualType::PCK_ARCWeak:
95
4
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
24
    case QualType::PCK_Struct:
97
4
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
24
    case QualType::PCK_Trivial:
99
8
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
24
    case QualType::PCK_VolatileTrivial:
101
0
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
0
    }
103
0
104
0
    llvm_unreachable("unknown primitive copy kind");
105
0
  }
CGNonTrivialStruct.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::GenMoveAssignment, true, void>::visitWithKind<clang::FieldDecl const*&, clang::CharUnits&, std::__1::array<clang::CodeGen::Address, 2ul>&>(clang::QualType::PrimitiveCopyKind, clang::QualType, clang::FieldDecl const*&&&, clang::CharUnits&&&, std::__1::array<clang::CodeGen::Address, 2ul>&&&)
Line
Count
Source
88
22
                      Ts &&... Args) {
89
22
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
22
91
22
    switch (PCK) {
92
22
    case QualType::PCK_ARCStrong:
93
6
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
22
    case QualType::PCK_ARCWeak:
95
4
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
22
    case QualType::PCK_Struct:
97
4
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
22
    case QualType::PCK_Trivial:
99
8
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
22
    case QualType::PCK_VolatileTrivial:
101
0
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
0
    }
103
0
104
0
    llvm_unreachable("unknown primitive copy kind");
105
0
  }
SemaChecking.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::SearchNonTrivialToCopyField, false, void>::visitWithKind<clang::SourceLocation&>(clang::QualType::PrimitiveCopyKind, clang::QualType, clang::SourceLocation&&&)
Line
Count
Source
88
14
                      Ts &&... Args) {
89
14
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
14
91
14
    switch (PCK) {
92
14
    case QualType::PCK_ARCStrong:
93
4
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
14
    case QualType::PCK_ARCWeak:
95
2
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
14
    case QualType::PCK_Struct:
97
2
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
14
    case QualType::PCK_Trivial:
99
4
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
14
    case QualType::PCK_VolatileTrivial:
101
2
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
0
    }
103
0
104
0
    llvm_unreachable("unknown primitive copy kind");
105
0
  }
SemaDecl.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionCopyVisitor, false, void>::visitWithKind<clang::FieldDecl const*&, bool&>(clang::QualType::PrimitiveCopyKind, clang::QualType, clang::FieldDecl const*&&&, bool&&&)
Line
Count
Source
88
110
                      Ts &&... Args) {
89
110
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
110
91
110
    switch (PCK) {
92
110
    case QualType::PCK_ARCStrong:
93
41
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
110
    case QualType::PCK_ARCWeak:
95
28
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
110
    case QualType::PCK_Struct:
97
41
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
110
    case QualType::PCK_Trivial:
99
0
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
110
    case QualType::PCK_VolatileTrivial:
101
0
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
0
    }
103
0
104
0
    llvm_unreachable("unknown primitive copy kind");
105
0
  }
106
107
1.64k
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenBinaryFuncName<false>, false, void>::asDerived()
Line
Count
Source
107
518
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenCopyConstructor, false, void>::asDerived()
Line
Count
Source
107
233
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenCopyAssignment, false, void>::asDerived()
Line
Count
Source
107
72
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenBinaryFuncName<true>, true, void>::asDerived()
Line
Count
Source
107
210
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenMoveConstructor, true, void>::asDerived()
Line
Count
Source
107
72
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenMoveAssignment, true, void>::asDerived()
Line
Count
Source
107
66
  Derived &asDerived() { return static_cast<Derived &>(*this); }
SemaChecking.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::SearchNonTrivialToCopyField, false, void>::asDerived()
Line
Count
Source
107
62
  Derived &asDerived() { return static_cast<Derived &>(*this); }
SemaDecl.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionCopyVisitor, false, void>::asDerived()
Line
Count
Source
107
411
  Derived &asDerived() { return static_cast<Derived &>(*this); }
108
};
109
110
} // end namespace clang
111
112
#endif