Coverage Report

Created: 2020-02-25 14:32

/Users/buildslave/jenkins/workspace/coverage/llvm-project/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
521
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
521
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
521
                                     std::forward<Ts>(Args)...);
25
521
  }
SemaDecl.cpp:void clang::DestructedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionDestructedTypeVisitor, void>::visit<std::nullptr_t, bool>(clang::QualType, std::nullptr_t&&, bool&&)
Line
Count
Source
22
38
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
38
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
38
                                     std::forward<Ts>(Args)...);
25
38
  }
SemaDecl.cpp:void clang::DestructedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionDestructedTypeVisitor, void>::visit<clang::FieldDecl const*&, bool&>(clang::QualType, clang::FieldDecl const*&&&, bool&&&)
Line
Count
Source
22
110
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
110
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
110
                                     std::forward<Ts>(Args)...);
25
110
  }
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
275
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
275
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
275
                                     std::forward<Ts>(Args)...);
25
275
  }
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
98
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
98
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
98
                                     std::forward<Ts>(Args)...);
25
98
  }
26
27
  template <class... Ts>
28
  RetTy visitWithKind(QualType::DestructionKind DK, QualType FT,
29
503
                      Ts &&... Args) {
30
503
    switch (DK) {
31
192
    case QualType::DK_objc_strong_lifetime:
32
192
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
33
90
    case QualType::DK_nontrivial_c_struct:
34
90
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
35
154
    case QualType::DK_none:
36
154
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
37
0
    case QualType::DK_cxx_destructor:
38
0
      return asDerived().visitCXXDestructor(FT, std::forward<Ts>(Args)...);
39
67
    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
  }
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
148
                      Ts &&... Args) {
30
148
    switch (DK) {
31
56
    case QualType::DK_objc_strong_lifetime:
32
56
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
33
56
    case QualType::DK_nontrivial_c_struct:
34
56
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
35
0
    case QualType::DK_none:
36
0
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
37
0
    case QualType::DK_cxx_destructor:
38
0
      return asDerived().visitCXXDestructor(FT, std::forward<Ts>(Args)...);
39
36
    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
  }
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
263
                      Ts &&... Args) {
30
263
    switch (DK) {
31
101
    case QualType::DK_objc_strong_lifetime:
32
101
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
33
26
    case QualType::DK_nontrivial_c_struct:
34
26
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
35
111
    case QualType::DK_none:
36
111
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
37
0
    case QualType::DK_cxx_destructor:
38
0
      return asDerived().visitCXXDestructor(FT, std::forward<Ts>(Args)...);
39
25
    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
92
                      Ts &&... Args) {
30
92
    switch (DK) {
31
35
    case QualType::DK_objc_strong_lifetime:
32
35
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
33
8
    case QualType::DK_nontrivial_c_struct:
34
8
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
35
43
    case QualType::DK_none:
36
43
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
37
0
    case QualType::DK_cxx_destructor:
38
0
      return asDerived().visitCXXDestructor(FT, std::forward<Ts>(Args)...);
39
6
    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
  }
45
46
1.13k
  Derived &asDerived() { return static_cast<Derived &>(*this); }
SemaDecl.cpp:clang::DestructedTypeVisitor<(anonymous namespace)::DiagNonTrivalCUnionDestructedTypeVisitor, void>::asDerived()
Line
Count
Source
46
406
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DestructedTypeVisitor<(anonymous namespace)::GenDestructorFuncName, void>::asDerived()
Line
Count
Source
46
538
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DestructedTypeVisitor<(anonymous namespace)::GenDestructor, void>::asDerived()
Line
Count
Source
46
190
  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
  }
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
  }
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
  }
56
57
  template <class... Ts>
58
  RetTy visitWithKind(QualType::PrimitiveDefaultInitializeKind PDIK,
59
216
                      QualType FT, Ts &&... Args) {
60
216
    switch (PDIK) {
61
64
    case QualType::PDIK_ARCStrong:
62
64
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
63
31
    case QualType::PDIK_ARCWeak:
64
31
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
65
66
    case QualType::PDIK_Struct:
66
66
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
67
55
    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
  }
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
4
    case QualType::PDIK_ARCStrong:
62
4
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
63
2
    case QualType::PDIK_ARCWeak:
64
2
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
65
2
    case QualType::PDIK_Struct:
66
2
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
67
6
    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
17
    case QualType::PDIK_ARCStrong:
62
17
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
63
12
    case QualType::PDIK_ARCWeak:
64
12
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
65
17
    case QualType::PDIK_Struct:
66
17
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
67
0
    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
  }
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
9
    case QualType::PDIK_ARCStrong:
62
9
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
63
5
    case QualType::PDIK_ARCWeak:
64
5
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
65
37
    case QualType::PDIK_Struct:
66
37
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
67
12
    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
34
    case QualType::PDIK_ARCStrong:
62
34
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
63
12
    case QualType::PDIK_ARCWeak:
64
12
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
65
10
    case QualType::PDIK_Struct:
66
10
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
67
37
    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
  }
73
74
487
  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); }
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); }
75
};
76
77
template <class Derived, bool IsMove, class RetTy = void>
78
struct CopiedTypeVisitor {
79
521
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
521
    QualType::PrimitiveCopyKind PCK =
81
521
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()116
82
521
               : 
FT.isNonTrivialToPrimitiveCopy()405
;
83
521
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
521
  }
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
30
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
30
    QualType::PrimitiveCopyKind PCK =
81
30
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
82
30
               : FT.isNonTrivialToPrimitiveCopy();
83
30
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
30
  }
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
82
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
82
    QualType::PrimitiveCopyKind PCK =
81
82
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
82
82
               : FT.isNonTrivialToPrimitiveCopy();
83
82
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
82
  }
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
  }
85
86
  template <class... Ts>
87
  RetTy visitWithKind(QualType::PrimitiveCopyKind PCK, QualType FT,
88
515
                      Ts &&... Args) {
89
515
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
515
91
515
    switch (PCK) {
92
180
    case QualType::PCK_ARCStrong:
93
180
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
73
    case QualType::PCK_ARCWeak:
95
73
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
82
    case QualType::PCK_Struct:
97
82
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
162
    case QualType::PCK_Trivial:
99
162
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
18
    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
  }
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
4
    case QualType::PCK_ARCStrong:
93
4
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
2
    case QualType::PCK_ARCWeak:
95
2
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
2
    case QualType::PCK_Struct:
97
2
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
4
    case QualType::PCK_Trivial:
99
4
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
2
    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
112
                      Ts &&... Args) {
89
112
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
112
91
112
    switch (PCK) {
92
42
    case QualType::PCK_ARCStrong:
93
42
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
28
    case QualType::PCK_ARCWeak:
95
28
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
42
    case QualType::PCK_Struct:
97
42
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
0
    case QualType::PCK_Trivial:
99
0
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
0
    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<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
61
    case QualType::PCK_ARCStrong:
93
61
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
18
    case QualType::PCK_ARCWeak:
95
18
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
11
    case QualType::PCK_Struct:
97
11
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
74
    case QualType::PCK_Trivial:
99
74
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
8
    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
25
    case QualType::PCK_ARCStrong:
93
25
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
5
    case QualType::PCK_ARCWeak:
95
5
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
7
    case QualType::PCK_Struct:
97
7
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
32
    case QualType::PCK_Trivial:
99
32
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
8
    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
8
    case QualType::PCK_ARCStrong:
93
8
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
4
    case QualType::PCK_ARCWeak:
95
4
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
4
    case QualType::PCK_Struct:
97
4
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
8
    case QualType::PCK_Trivial:
99
8
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
0
    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
26
    case QualType::PCK_ARCStrong:
93
26
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
8
    case QualType::PCK_ARCWeak:
95
8
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
8
    case QualType::PCK_Struct:
97
8
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
28
    case QualType::PCK_Trivial:
99
28
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
0
    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
8
    case QualType::PCK_ARCStrong:
93
8
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
4
    case QualType::PCK_ARCWeak:
95
4
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
4
    case QualType::PCK_Struct:
97
4
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
8
    case QualType::PCK_Trivial:
99
8
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
0
    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
6
    case QualType::PCK_ARCStrong:
93
6
      return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
94
4
    case QualType::PCK_ARCWeak:
95
4
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
96
4
    case QualType::PCK_Struct:
97
4
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
8
    case QualType::PCK_Trivial:
99
8
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
0
    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.65k
  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
418
  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); }
108
};
109
110
} // end namespace clang
111
112
#endif