Coverage Report

Created: 2018-09-23 22:08

/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
//                     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 visitor classes that are used to traverse non-trivial
11
//  structs.
12
//
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_CLANG_NON_TRIVIAL_TYPE_VISITOR_H
16
#define LLVM_CLANG_NON_TRIVIAL_TYPE_VISITOR_H
17
18
#include "clang/AST/Type.h"
19
20
namespace clang {
21
22
template <class Derived, class RetTy = void> struct DestructedTypeVisitor {
23
297
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
24
297
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
25
297
                                     std::forward<Ts>(Args)...);
26
297
  }
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
23
209
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
24
209
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
25
209
                                     std::forward<Ts>(Args)...);
26
209
  }
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
23
88
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
24
88
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
25
88
                                     std::forward<Ts>(Args)...);
26
88
  }
27
28
  template <class... Ts>
29
  RetTy visitWithKind(QualType::DestructionKind DK, QualType FT,
30
279
                      Ts &&... Args) {
31
279
    switch (DK) {
32
279
    case QualType::DK_objc_strong_lifetime:
33
98
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
34
279
    case QualType::DK_nontrivial_c_struct:
35
14
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
36
279
    case QualType::DK_none:
37
136
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
38
279
    case QualType::DK_cxx_destructor:
39
0
      return asDerived().visitCXXDestructor(FT, std::forward<Ts>(Args)...);
40
279
    case QualType::DK_objc_weak_lifetime:
41
31
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
42
0
    }
43
0
44
0
    llvm_unreachable("unknown destruction kind");
45
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
30
197
                      Ts &&... Args) {
31
197
    switch (DK) {
32
197
    case QualType::DK_objc_strong_lifetime:
33
69
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
34
197
    case QualType::DK_nontrivial_c_struct:
35
10
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
36
197
    case QualType::DK_none:
37
93
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
38
197
    case QualType::DK_cxx_destructor:
39
0
      return asDerived().visitCXXDestructor(FT, std::forward<Ts>(Args)...);
40
197
    case QualType::DK_objc_weak_lifetime:
41
25
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
42
0
    }
43
0
44
0
    llvm_unreachable("unknown destruction kind");
45
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
30
82
                      Ts &&... Args) {
31
82
    switch (DK) {
32
82
    case QualType::DK_objc_strong_lifetime:
33
29
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
34
82
    case QualType::DK_nontrivial_c_struct:
35
4
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
36
82
    case QualType::DK_none:
37
43
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
38
82
    case QualType::DK_cxx_destructor:
39
0
      return asDerived().visitCXXDestructor(FT, std::forward<Ts>(Args)...);
40
82
    case QualType::DK_objc_weak_lifetime:
41
6
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
42
0
    }
43
0
44
0
    llvm_unreachable("unknown destruction kind");
45
0
  }
46
47
576
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DestructedTypeVisitor<(anonymous namespace)::GenDestructorFuncName, void>::asDerived()
Line
Count
Source
47
406
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DestructedTypeVisitor<(anonymous namespace)::GenDestructor, void>::asDerived()
Line
Count
Source
47
170
  Derived &asDerived() { return static_cast<Derived &>(*this); }
48
};
49
50
template <class Derived, class RetTy = void>
51
struct DefaultInitializedTypeVisitor {
52
141
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
53
141
    return asDerived().visitWithKind(
54
141
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
55
141
        std::forward<Ts>(Args)...);
56
141
  }
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
52
26
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
53
26
    return asDerived().visitWithKind(
54
26
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
55
26
        std::forward<Ts>(Args)...);
56
26
  }
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
52
71
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
53
71
    return asDerived().visitWithKind(
54
71
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
55
71
        std::forward<Ts>(Args)...);
56
71
  }
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
52
28
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
53
28
    return asDerived().visitWithKind(
54
28
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
55
28
        std::forward<Ts>(Args)...);
56
28
  }
SemaChecking.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::SearchNonTrivialToInitializeField, void>::visit<clang::SourceLocation>(clang::QualType, clang::SourceLocation&&)
Line
Count
Source
52
14
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
53
14
    return asDerived().visitWithKind(
54
14
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
55
14
        std::forward<Ts>(Args)...);
56
14
  }
SemaChecking.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::SearchNonTrivialToInitializeField, void>::visit<clang::SourceLocation&>(clang::QualType, clang::SourceLocation&&&)
Line
Count
Source
52
2
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
53
2
    return asDerived().visitWithKind(
54
2
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
55
2
        std::forward<Ts>(Args)...);
56
2
  }
57
58
  template <class... Ts>
59
  RetTy visitWithKind(QualType::PrimitiveDefaultInitializeKind PDIK,
60
137
                      QualType FT, Ts &&... Args) {
61
137
    switch (PDIK) {
62
137
    case QualType::PDIK_ARCStrong:
63
31
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
64
137
    case QualType::PDIK_ARCWeak:
65
19
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
66
137
    case QualType::PDIK_Struct:
67
38
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
68
137
    case QualType::PDIK_Trivial:
69
49
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
70
0
    }
71
0
72
0
    llvm_unreachable("unknown default-initialize kind");
73
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
60
52
                      QualType FT, Ts &&... Args) {
61
52
    switch (PDIK) {
62
52
    case QualType::PDIK_ARCStrong:
63
5
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
64
52
    case QualType::PDIK_ARCWeak:
65
5
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
66
52
    case QualType::PDIK_Struct:
67
30
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
68
52
    case QualType::PDIK_Trivial:
69
12
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
70
0
    }
71
0
72
0
    llvm_unreachable("unknown default-initialize kind");
73
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
60
71
                      QualType FT, Ts &&... Args) {
61
71
    switch (PDIK) {
62
71
    case QualType::PDIK_ARCStrong:
63
22
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
64
71
    case QualType::PDIK_ARCWeak:
65
12
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
66
71
    case QualType::PDIK_Struct:
67
6
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
68
71
    case QualType::PDIK_Trivial:
69
31
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
70
0
    }
71
0
72
0
    llvm_unreachable("unknown default-initialize kind");
73
0
  }
SemaChecking.cpp:void clang::DefaultInitializedTypeVisitor<(anonymous namespace)::SearchNonTrivialToInitializeField, void>::visitWithKind<clang::SourceLocation&>(clang::QualType::PrimitiveDefaultInitializeKind, clang::QualType, clang::SourceLocation&&&)
Line
Count
Source
60
14
                      QualType FT, Ts &&... Args) {
61
14
    switch (PDIK) {
62
14
    case QualType::PDIK_ARCStrong:
63
4
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
64
14
    case QualType::PDIK_ARCWeak:
65
2
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
66
14
    case QualType::PDIK_Struct:
67
2
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
68
14
    case QualType::PDIK_Trivial:
69
6
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
70
0
    }
71
0
72
0
    llvm_unreachable("unknown default-initialize kind");
73
0
  }
74
75
296
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DefaultInitializedTypeVisitor<(anonymous namespace)::GenDefaultInitialize, void>::asDerived()
Line
Count
Source
75
106
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DefaultInitializedTypeVisitor<(anonymous namespace)::GenDefaultInitializeFuncName, void>::asDerived()
Line
Count
Source
75
142
  Derived &asDerived() { return static_cast<Derived &>(*this); }
SemaChecking.cpp:clang::DefaultInitializedTypeVisitor<(anonymous namespace)::SearchNonTrivialToInitializeField, void>::asDerived()
Line
Count
Source
75
48
  Derived &asDerived() { return static_cast<Derived &>(*this); }
76
};
77
78
template <class Derived, bool IsMove, class RetTy = void>
79
struct CopiedTypeVisitor {
80
319
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
81
319
    QualType::PrimitiveCopyKind PCK =
82
319
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()80
83
319
               : 
FT.isNonTrivialToPrimitiveCopy()239
;
84
319
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
85
319
  }
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
80
134
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
81
134
    QualType::PrimitiveCopyKind PCK =
82
134
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
83
134
               : FT.isNonTrivialToPrimitiveCopy();
84
134
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
85
134
  }
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
80
69
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
81
69
    QualType::PrimitiveCopyKind PCK =
82
69
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
83
69
               : FT.isNonTrivialToPrimitiveCopy();
84
69
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
85
69
  }
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
80
20
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
81
20
    QualType::PrimitiveCopyKind PCK =
82
20
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
83
20
               : FT.isNonTrivialToPrimitiveCopy();
84
20
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
85
20
  }
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
80
44
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
81
44
    QualType::PrimitiveCopyKind PCK =
82
44
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
83
44
               : 
FT.isNonTrivialToPrimitiveCopy()0
;
84
44
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
85
44
  }
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
80
18
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
81
18
    QualType::PrimitiveCopyKind PCK =
82
18
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
83
18
               : 
FT.isNonTrivialToPrimitiveCopy()0
;
84
18
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
85
18
  }
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
80
18
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
81
18
    QualType::PrimitiveCopyKind PCK =
82
18
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
83
18
               : 
FT.isNonTrivialToPrimitiveCopy()0
;
84
18
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
85
18
  }
SemaChecking.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::SearchNonTrivialToCopyField, false, void>::visit<clang::SourceLocation>(clang::QualType, clang::SourceLocation&&)
Line
Count
Source
80
14
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
81
14
    QualType::PrimitiveCopyKind PCK =
82
14
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
83
14
               : FT.isNonTrivialToPrimitiveCopy();
84
14
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
85
14
  }
SemaChecking.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::SearchNonTrivialToCopyField, false, void>::visit<clang::SourceLocation&>(clang::QualType, clang::SourceLocation&&&)
Line
Count
Source
80
2
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
81
2
    QualType::PrimitiveCopyKind PCK =
82
2
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
83
2
               : FT.isNonTrivialToPrimitiveCopy();
84
2
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
85
2
  }
86
87
  template <class... Ts>
88
  RetTy visitWithKind(QualType::PrimitiveCopyKind PCK, QualType FT,
89
313
                      Ts &&... Args) {
90
313
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
91
313
92
313
    switch (PCK) {
93
313
    case QualType::PCK_ARCStrong:
94
94
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
95
313
    case QualType::PCK_ARCWeak:
96
45
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
97
313
    case QualType::PCK_Struct:
98
18
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
99
313
    case QualType::PCK_Trivial:
100
138
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
101
313
    case QualType::PCK_VolatileTrivial:
102
18
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
103
0
    }
104
0
105
0
    llvm_unreachable("unknown primitive copy kind");
106
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
89
132
                      Ts &&... Args) {
90
132
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
91
132
92
132
    switch (PCK) {
93
132
    case QualType::PCK_ARCStrong:
94
42
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
95
132
    case QualType::PCK_ARCWeak:
96
18
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
97
132
    case QualType::PCK_Struct:
98
4
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
99
132
    case QualType::PCK_Trivial:
100
60
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
101
132
    case QualType::PCK_VolatileTrivial:
102
8
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
103
0
    }
104
0
105
0
    llvm_unreachable("unknown primitive copy kind");
106
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
89
67
                      Ts &&... Args) {
90
67
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
91
67
92
67
    switch (PCK) {
93
67
    case QualType::PCK_ARCStrong:
94
22
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
95
67
    case QualType::PCK_ARCWeak:
96
5
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
97
67
    case QualType::PCK_Struct:
98
2
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
99
67
    case QualType::PCK_Trivial:
100
30
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
101
67
    case QualType::PCK_VolatileTrivial:
102
8
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
103
0
    }
104
0
105
0
    llvm_unreachable("unknown primitive copy kind");
106
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
89
20
                      Ts &&... Args) {
90
20
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
91
20
92
20
    switch (PCK) {
93
20
    case QualType::PCK_ARCStrong:
94
6
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
95
20
    case QualType::PCK_ARCWeak:
96
4
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
97
20
    case QualType::PCK_Struct:
98
2
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
99
20
    case QualType::PCK_Trivial:
100
8
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
101
20
    case QualType::PCK_VolatileTrivial:
102
0
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
103
0
    }
104
0
105
0
    llvm_unreachable("unknown primitive copy kind");
106
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
89
44
                      Ts &&... Args) {
90
44
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
91
44
92
44
    switch (PCK) {
93
44
    case QualType::PCK_ARCStrong:
94
12
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
95
44
    case QualType::PCK_ARCWeak:
96
8
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
97
44
    case QualType::PCK_Struct:
98
4
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
99
44
    case QualType::PCK_Trivial:
100
20
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
101
44
    case QualType::PCK_VolatileTrivial:
102
0
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
103
0
    }
104
0
105
0
    llvm_unreachable("unknown primitive copy kind");
106
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
89
18
                      Ts &&... Args) {
90
18
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
91
18
92
18
    switch (PCK) {
93
18
    case QualType::PCK_ARCStrong:
94
4
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
95
18
    case QualType::PCK_ARCWeak:
96
4
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
97
18
    case QualType::PCK_Struct:
98
2
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
99
18
    case QualType::PCK_Trivial:
100
8
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
101
18
    case QualType::PCK_VolatileTrivial:
102
0
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
103
0
    }
104
0
105
0
    llvm_unreachable("unknown primitive copy kind");
106
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
89
18
                      Ts &&... Args) {
90
18
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
91
18
92
18
    switch (PCK) {
93
18
    case QualType::PCK_ARCStrong:
94
4
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
95
18
    case QualType::PCK_ARCWeak:
96
4
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
97
18
    case QualType::PCK_Struct:
98
2
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
99
18
    case QualType::PCK_Trivial:
100
8
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
101
18
    case QualType::PCK_VolatileTrivial:
102
0
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
103
0
    }
104
0
105
0
    llvm_unreachable("unknown primitive copy kind");
106
0
  }
SemaChecking.cpp:void clang::CopiedTypeVisitor<(anonymous namespace)::SearchNonTrivialToCopyField, false, void>::visitWithKind<clang::SourceLocation&>(clang::QualType::PrimitiveCopyKind, clang::QualType, clang::SourceLocation&&&)
Line
Count
Source
89
14
                      Ts &&... Args) {
90
14
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
91
14
92
14
    switch (PCK) {
93
14
    case QualType::PCK_ARCStrong:
94
4
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
95
14
    case QualType::PCK_ARCWeak:
96
2
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
97
14
    case QualType::PCK_Struct:
98
2
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
99
14
    case QualType::PCK_Trivial:
100
4
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
101
14
    case QualType::PCK_VolatileTrivial:
102
2
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
103
0
    }
104
0
105
0
    llvm_unreachable("unknown primitive copy kind");
106
0
  }
107
108
963
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenBinaryFuncName<false>, false, void>::asDerived()
Line
Count
Source
108
398
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenCopyConstructor, false, void>::asDerived()
Line
Count
Source
108
203
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenCopyAssignment, false, void>::asDerived()
Line
Count
Source
108
60
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenBinaryFuncName<true>, true, void>::asDerived()
Line
Count
Source
108
132
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenMoveConstructor, true, void>::asDerived()
Line
Count
Source
108
54
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenMoveAssignment, true, void>::asDerived()
Line
Count
Source
108
54
  Derived &asDerived() { return static_cast<Derived &>(*this); }
SemaChecking.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::SearchNonTrivialToCopyField, false, void>::asDerived()
Line
Count
Source
108
62
  Derived &asDerived() { return static_cast<Derived &>(*this); }
109
};
110
111
} // end namespace clang
112
113
#endif