Coverage Report

Created: 2020-10-24 06:27

/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
617
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
617
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
617
                                     std::forward<Ts>(Args)...);
25
617
  }
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
353
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
353
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
353
                                     std::forward<Ts>(Args)...);
25
353
  }
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
116
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
116
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
116
                                     std::forward<Ts>(Args)...);
25
116
  }
26
27
  template <class... Ts>
28
  RetTy visitWithKind(QualType::DestructionKind DK, QualType FT,
29
599
                      Ts &&... Args) {
30
599
    switch (DK) {
31
230
    case QualType::DK_objc_strong_lifetime:
32
230
      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
208
    case QualType::DK_none:
36
208
      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
71
    case QualType::DK_objc_weak_lifetime:
40
71
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
41
0
    }
42
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
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
341
                      Ts &&... Args) {
30
341
    switch (DK) {
31
135
    case QualType::DK_objc_strong_lifetime:
32
135
      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
153
    case QualType::DK_none:
36
153
      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
27
    case QualType::DK_objc_weak_lifetime:
40
27
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
41
0
    }
42
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
110
                      Ts &&... Args) {
30
110
    switch (DK) {
31
39
    case QualType::DK_objc_strong_lifetime:
32
39
      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
55
    case QualType::DK_none:
36
55
      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
8
    case QualType::DK_objc_weak_lifetime:
40
8
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
41
0
    }
42
43
0
    llvm_unreachable("unknown destruction kind");
44
0
  }
45
46
1.32k
  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
694
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DestructedTypeVisitor<(anonymous namespace)::GenDestructor, void>::asDerived()
Line
Count
Source
46
226
  Derived &asDerived() { return static_cast<Derived &>(*this); }
47
};
48
49
template <class Derived, class RetTy = void>
50
struct DefaultInitializedTypeVisitor {
51
246
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
246
    return asDerived().visitWithKind(
53
246
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
246
        std::forward<Ts>(Args)...);
55
246
  }
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
37
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
37
    return asDerived().visitWithKind(
53
37
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
37
        std::forward<Ts>(Args)...);
55
37
  }
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
105
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
105
    return asDerived().visitWithKind(
53
105
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
105
        std::forward<Ts>(Args)...);
55
105
  }
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
42
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
42
    return asDerived().visitWithKind(
53
42
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
42
        std::forward<Ts>(Args)...);
55
42
  }
56
57
  template <class... Ts>
58
  RetTy visitWithKind(QualType::PrimitiveDefaultInitializeKind PDIK,
59
242
                      QualType FT, Ts &&... Args) {
60
242
    switch (PDIK) {
61
74
    case QualType::PDIK_ARCStrong:
62
74
      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
72
    case QualType::PDIK_Struct:
66
72
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
67
65
    case QualType::PDIK_Trivial:
68
65
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
69
0
    }
70
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
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
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
77
                      QualType FT, Ts &&... Args) {
60
77
    switch (PDIK) {
61
13
    case QualType::PDIK_ARCStrong:
62
13
      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
43
    case QualType::PDIK_Struct:
66
43
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
67
16
    case QualType::PDIK_Trivial:
68
16
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
69
0
    }
70
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
105
                      QualType FT, Ts &&... Args) {
60
105
    switch (PDIK) {
61
40
    case QualType::PDIK_ARCStrong:
62
40
      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
43
    case QualType::PDIK_Trivial:
68
43
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
69
0
    }
70
71
0
    llvm_unreachable("unknown default-initialize kind");
72
0
  }
73
74
539
  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
156
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DefaultInitializedTypeVisitor<(anonymous namespace)::GenDefaultInitializeFuncName, void>::asDerived()
Line
Count
Source
74
210
  Derived &asDerived() { return static_cast<Derived &>(*this); }
75
};
76
77
template <class Derived, bool IsMove, class RetTy = void>
78
struct CopiedTypeVisitor {
79
585
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
585
    QualType::PrimitiveCopyKind PCK =
81
116
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
82
469
               : FT.isNonTrivialToPrimitiveCopy();
83
585
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
585
  }
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
0
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
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
0
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
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
0
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
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
0
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
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
226
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
226
    QualType::PrimitiveCopyKind PCK =
81
0
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
82
226
               : FT.isNonTrivialToPrimitiveCopy();
83
226
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
226
  }
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
83
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
83
    QualType::PrimitiveCopyKind PCK =
81
0
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
82
83
               : FT.isNonTrivialToPrimitiveCopy();
83
83
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
83
  }
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
32
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
32
    QualType::PrimitiveCopyKind PCK =
81
0
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
82
32
               : FT.isNonTrivialToPrimitiveCopy();
83
32
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
32
  }
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
0
               : FT.isNonTrivialToPrimitiveCopy();
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
0
               : FT.isNonTrivialToPrimitiveCopy();
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
0
               : FT.isNonTrivialToPrimitiveCopy();
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
579
                      Ts &&... Args) {
89
579
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
91
579
    switch (PCK) {
92
212
    case QualType::PCK_ARCStrong:
93
212
      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
186
    case QualType::PCK_Trivial:
99
186
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
26
    case QualType::PCK_VolatileTrivial:
101
26
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
0
    }
103
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
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
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
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
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
224
                      Ts &&... Args) {
89
224
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
91
224
    switch (PCK) {
92
87
    case QualType::PCK_ARCStrong:
93
87
      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
96
    case QualType::PCK_Trivial:
99
96
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
12
    case QualType::PCK_VolatileTrivial:
101
12
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
0
    }
103
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
81
                      Ts &&... Args) {
89
81
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
91
81
    switch (PCK) {
92
27
    case QualType::PCK_ARCStrong:
93
27
      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
10
    case QualType::PCK_VolatileTrivial:
101
10
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
0
    }
103
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
32
                      Ts &&... Args) {
89
32
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
91
32
    switch (PCK) {
92
12
    case QualType::PCK_ARCStrong:
93
12
      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
10
    case QualType::PCK_Trivial:
99
10
      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
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
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
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
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
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
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
104
0
    llvm_unreachable("unknown primitive copy kind");
105
0
  }
106
107
1.84k
  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
674
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenCopyConstructor, false, void>::asDerived()
Line
Count
Source
107
245
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenCopyAssignment, false, void>::asDerived()
Line
Count
Source
107
96
  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