Coverage Report

Created: 2021-08-24 07:12

/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
638
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
638
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
638
                                     std::forward<Ts>(Args)...);
25
638
  }
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
371
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
371
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
371
                                     std::forward<Ts>(Args)...);
25
371
  }
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
119
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
23
119
    return asDerived().visitWithKind(FT.isDestructedType(), FT,
24
119
                                     std::forward<Ts>(Args)...);
25
119
  }
26
27
  template <class... Ts>
28
  RetTy visitWithKind(QualType::DestructionKind DK, QualType FT,
29
620
                      Ts &&... Args) {
30
620
    switch (DK) {
31
241
    case QualType::DK_objc_strong_lifetime:
32
241
      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
214
    case QualType::DK_none:
36
214
      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
75
    case QualType::DK_objc_weak_lifetime:
40
75
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
41
620
    }
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
148
    }
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
359
                      Ts &&... Args) {
30
359
    switch (DK) {
31
143
    case QualType::DK_objc_strong_lifetime:
32
143
      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
159
    case QualType::DK_none:
36
159
      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
31
    case QualType::DK_objc_weak_lifetime:
40
31
      return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
41
359
    }
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
113
                      Ts &&... Args) {
30
113
    switch (DK) {
31
42
    case QualType::DK_objc_strong_lifetime:
32
42
      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
113
    }
42
43
0
    llvm_unreachable("unknown destruction kind");
44
0
  }
45
46
1.36k
  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
730
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DestructedTypeVisitor<(anonymous namespace)::GenDestructor, void>::asDerived()
Line
Count
Source
46
232
  Derived &asDerived() { return static_cast<Derived &>(*this); }
47
};
48
49
template <class Derived, class RetTy = void>
50
struct DefaultInitializedTypeVisitor {
51
249
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
249
    return asDerived().visitWithKind(
53
249
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
249
        std::forward<Ts>(Args)...);
55
249
  }
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
38
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
38
    return asDerived().visitWithKind(
53
38
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
38
        std::forward<Ts>(Args)...);
55
38
  }
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
106
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
106
    return asDerived().visitWithKind(
53
106
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
106
        std::forward<Ts>(Args)...);
55
106
  }
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
43
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
52
43
    return asDerived().visitWithKind(
53
43
        FT.isNonTrivialToPrimitiveDefaultInitialize(), FT,
54
43
        std::forward<Ts>(Args)...);
55
43
  }
56
57
  template <class... Ts>
58
  RetTy visitWithKind(QualType::PrimitiveDefaultInitializeKind PDIK,
59
245
                      QualType FT, Ts &&... Args) {
60
245
    switch (PDIK) {
61
76
    case QualType::PDIK_ARCStrong:
62
76
      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
73
    case QualType::PDIK_Struct:
66
73
      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
245
    }
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
14
    }
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
46
    }
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
79
                      QualType FT, Ts &&... Args) {
60
79
    switch (PDIK) {
61
14
    case QualType::PDIK_ARCStrong:
62
14
      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
44
    case QualType::PDIK_Struct:
66
44
      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
79
    }
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
106
                      QualType FT, Ts &&... Args) {
60
106
    switch (PDIK) {
61
41
    case QualType::PDIK_ARCStrong:
62
41
      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
106
    }
70
71
0
    llvm_unreachable("unknown default-initialize kind");
72
0
  }
73
74
545
  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
160
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::DefaultInitializedTypeVisitor<(anonymous namespace)::GenDefaultInitializeFuncName, void>::asDerived()
Line
Count
Source
74
212
  Derived &asDerived() { return static_cast<Derived &>(*this); }
75
};
76
77
template <class Derived, bool IsMove, class RetTy = void>
78
struct CopiedTypeVisitor {
79
605
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
605
    QualType::PrimitiveCopyKind PCK =
81
605
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()118
82
605
               : 
FT.isNonTrivialToPrimitiveCopy()487
;
83
605
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
605
  }
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
235
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
235
    QualType::PrimitiveCopyKind PCK =
81
235
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
82
235
               : FT.isNonTrivialToPrimitiveCopy();
83
235
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
235
  }
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
84
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
84
    QualType::PrimitiveCopyKind PCK =
81
84
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
82
84
               : FT.isNonTrivialToPrimitiveCopy();
83
84
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
84
  }
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
40
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
40
    QualType::PrimitiveCopyKind PCK =
81
40
        IsMove ? 
FT.isNonTrivialToPrimitiveDestructiveMove()0
82
40
               : FT.isNonTrivialToPrimitiveCopy();
83
40
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
40
  }
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
71
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
71
    QualType::PrimitiveCopyKind PCK =
81
71
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
82
71
               : 
FT.isNonTrivialToPrimitiveCopy()0
;
83
71
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
71
  }
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
25
  template <class... Ts> RetTy visit(QualType FT, Ts &&... Args) {
80
25
    QualType::PrimitiveCopyKind PCK =
81
25
        IsMove ? FT.isNonTrivialToPrimitiveDestructiveMove()
82
25
               : 
FT.isNonTrivialToPrimitiveCopy()0
;
83
25
    return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
84
25
  }
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
599
                      Ts &&... Args) {
89
599
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
91
599
    switch (PCK) {
92
220
    case QualType::PCK_ARCStrong:
93
220
      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
86
    case QualType::PCK_Struct:
97
86
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
184
    case QualType::PCK_Trivial:
99
184
      return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
100
36
    case QualType::PCK_VolatileTrivial:
101
36
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
599
    }
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
14
    }
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
112
    }
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
233
                      Ts &&... Args) {
89
233
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
91
233
    switch (PCK) {
92
90
    case QualType::PCK_ARCStrong:
93
90
      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
13
    case QualType::PCK_Struct:
97
13
      return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
98
94
    case QualType::PCK_Trivial:
99
94
      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
233
    }
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
82
                      Ts &&... Args) {
89
82
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
91
82
    switch (PCK) {
92
28
    case QualType::PCK_ARCStrong:
93
28
      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
82
    }
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
40
                      Ts &&... Args) {
89
40
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
91
40
    switch (PCK) {
92
14
    case QualType::PCK_ARCStrong:
93
14
      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
6
    case QualType::PCK_Struct:
97
6
      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
6
    case QualType::PCK_VolatileTrivial:
101
6
      return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
102
40
    }
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
71
                      Ts &&... Args) {
89
71
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
91
71
    switch (PCK) {
92
27
    case QualType::PCK_ARCStrong:
93
27
      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
71
    }
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
25
                      Ts &&... Args) {
89
25
    asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
90
91
25
    switch (PCK) {
92
9
    case QualType::PCK_ARCStrong:
93
9
      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
25
    }
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
22
    }
103
104
0
    llvm_unreachable("unknown primitive copy kind");
105
0
  }
106
107
1.90k
  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
701
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenCopyConstructor, false, void>::asDerived()
Line
Count
Source
107
248
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenCopyAssignment, false, void>::asDerived()
Line
Count
Source
107
120
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenBinaryFuncName<true>, true, void>::asDerived()
Line
Count
Source
107
213
  Derived &asDerived() { return static_cast<Derived &>(*this); }
CGNonTrivialStruct.cpp:clang::CopiedTypeVisitor<(anonymous namespace)::GenMoveConstructor, true, void>::asDerived()
Line
Count
Source
107
75
  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