Coverage Report

Created: 2022-01-18 06:27

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/AST/ASTImporter.cpp
Line
Count
Source (jump to first uncovered line)
1
//===- ASTImporter.cpp - Importing ASTs from other Contexts ---------------===//
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 ASTImporter class which imports AST nodes from one
10
//  context into another context.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#include "clang/AST/ASTImporter.h"
15
#include "clang/AST/ASTImporterSharedState.h"
16
#include "clang/AST/ASTContext.h"
17
#include "clang/AST/ASTDiagnostic.h"
18
#include "clang/AST/ASTStructuralEquivalence.h"
19
#include "clang/AST/Attr.h"
20
#include "clang/AST/Decl.h"
21
#include "clang/AST/DeclAccessPair.h"
22
#include "clang/AST/DeclBase.h"
23
#include "clang/AST/DeclCXX.h"
24
#include "clang/AST/DeclFriend.h"
25
#include "clang/AST/DeclGroup.h"
26
#include "clang/AST/DeclObjC.h"
27
#include "clang/AST/DeclTemplate.h"
28
#include "clang/AST/DeclVisitor.h"
29
#include "clang/AST/DeclarationName.h"
30
#include "clang/AST/Expr.h"
31
#include "clang/AST/ExprCXX.h"
32
#include "clang/AST/ExprObjC.h"
33
#include "clang/AST/ExternalASTSource.h"
34
#include "clang/AST/LambdaCapture.h"
35
#include "clang/AST/NestedNameSpecifier.h"
36
#include "clang/AST/OperationKinds.h"
37
#include "clang/AST/Stmt.h"
38
#include "clang/AST/StmtCXX.h"
39
#include "clang/AST/StmtObjC.h"
40
#include "clang/AST/StmtVisitor.h"
41
#include "clang/AST/TemplateBase.h"
42
#include "clang/AST/TemplateName.h"
43
#include "clang/AST/Type.h"
44
#include "clang/AST/TypeLoc.h"
45
#include "clang/AST/TypeVisitor.h"
46
#include "clang/AST/UnresolvedSet.h"
47
#include "clang/Basic/Builtins.h"
48
#include "clang/Basic/ExceptionSpecificationType.h"
49
#include "clang/Basic/FileManager.h"
50
#include "clang/Basic/IdentifierTable.h"
51
#include "clang/Basic/LLVM.h"
52
#include "clang/Basic/LangOptions.h"
53
#include "clang/Basic/SourceLocation.h"
54
#include "clang/Basic/SourceManager.h"
55
#include "clang/Basic/Specifiers.h"
56
#include "llvm/ADT/APSInt.h"
57
#include "llvm/ADT/ArrayRef.h"
58
#include "llvm/ADT/DenseMap.h"
59
#include "llvm/ADT/None.h"
60
#include "llvm/ADT/Optional.h"
61
#include "llvm/ADT/ScopeExit.h"
62
#include "llvm/ADT/STLExtras.h"
63
#include "llvm/ADT/SmallVector.h"
64
#include "llvm/Support/Casting.h"
65
#include "llvm/Support/ErrorHandling.h"
66
#include "llvm/Support/MemoryBuffer.h"
67
#include <algorithm>
68
#include <cassert>
69
#include <cstddef>
70
#include <memory>
71
#include <type_traits>
72
#include <utility>
73
74
namespace clang {
75
76
  using llvm::make_error;
77
  using llvm::Error;
78
  using llvm::Expected;
79
  using ExpectedTypePtr = llvm::Expected<const Type *>;
80
  using ExpectedType = llvm::Expected<QualType>;
81
  using ExpectedStmt = llvm::Expected<Stmt *>;
82
  using ExpectedExpr = llvm::Expected<Expr *>;
83
  using ExpectedDecl = llvm::Expected<Decl *>;
84
  using ExpectedSLoc = llvm::Expected<SourceLocation>;
85
  using ExpectedName = llvm::Expected<DeclarationName>;
86
87
92
  std::string ImportError::toString() const {
88
    // FIXME: Improve error texts.
89
92
    switch (Error) {
90
92
    case NameConflict:
91
92
      return "NameConflict";
92
0
    case UnsupportedConstruct:
93
0
      return "UnsupportedConstruct";
94
0
    case Unknown:
95
0
      return "Unknown error";
96
92
    }
97
0
    llvm_unreachable("Invalid error code.");
98
0
    return "Invalid error code.";
99
92
  }
100
101
0
  void ImportError::log(raw_ostream &OS) const {
102
0
    OS << toString();
103
0
  }
104
105
0
  std::error_code ImportError::convertToErrorCode() const {
106
0
    llvm_unreachable("Function not implemented.");
107
0
  }
108
109
  char ImportError::ID;
110
111
  template <class T>
112
  SmallVector<Decl *, 2>
113
867k
  getCanonicalForwardRedeclChain(Redeclarable<T>* D) {
114
867k
    SmallVector<Decl *, 2> Redecls;
115
1.01M
    for (auto *R : D->getFirstDecl()->redecls()) {
116
1.01M
      if (R != D->getFirstDecl())
117
145k
        Redecls.push_back(R);
118
1.01M
    }
119
867k
    Redecls.push_back(D->getFirstDecl());
120
867k
    std::reverse(Redecls.begin(), Redecls.end());
121
867k
    return Redecls;
122
867k
  }
llvm::SmallVector<clang::Decl*, 2u> clang::getCanonicalForwardRedeclChain<clang::FunctionDecl>(clang::Redeclarable<clang::FunctionDecl>*)
Line
Count
Source
113
683k
  getCanonicalForwardRedeclChain(Redeclarable<T>* D) {
114
683k
    SmallVector<Decl *, 2> Redecls;
115
799k
    for (auto *R : D->getFirstDecl()->redecls()) {
116
799k
      if (R != D->getFirstDecl())
117
116k
        Redecls.push_back(R);
118
799k
    }
119
683k
    Redecls.push_back(D->getFirstDecl());
120
683k
    std::reverse(Redecls.begin(), Redecls.end());
121
683k
    return Redecls;
122
683k
  }
llvm::SmallVector<clang::Decl*, 2u> clang::getCanonicalForwardRedeclChain<clang::VarDecl>(clang::Redeclarable<clang::VarDecl>*)
Line
Count
Source
113
131k
  getCanonicalForwardRedeclChain(Redeclarable<T>* D) {
114
131k
    SmallVector<Decl *, 2> Redecls;
115
139k
    for (auto *R : D->getFirstDecl()->redecls()) {
116
139k
      if (R != D->getFirstDecl())
117
7.62k
        Redecls.push_back(R);
118
139k
    }
119
131k
    Redecls.push_back(D->getFirstDecl());
120
131k
    std::reverse(Redecls.begin(), Redecls.end());
121
131k
    return Redecls;
122
131k
  }
llvm::SmallVector<clang::Decl*, 2u> clang::getCanonicalForwardRedeclChain<clang::TagDecl>(clang::Redeclarable<clang::TagDecl>*)
Line
Count
Source
113
51.7k
  getCanonicalForwardRedeclChain(Redeclarable<T>* D) {
114
51.7k
    SmallVector<Decl *, 2> Redecls;
115
73.3k
    for (auto *R : D->getFirstDecl()->redecls()) {
116
73.3k
      if (R != D->getFirstDecl())
117
21.5k
        Redecls.push_back(R);
118
73.3k
    }
119
51.7k
    Redecls.push_back(D->getFirstDecl());
120
51.7k
    std::reverse(Redecls.begin(), Redecls.end());
121
51.7k
    return Redecls;
122
51.7k
  }
123
124
867k
  SmallVector<Decl*, 2> getCanonicalForwardRedeclChain(Decl* D) {
125
867k
    if (auto *FD = dyn_cast<FunctionDecl>(D))
126
683k
      return getCanonicalForwardRedeclChain<FunctionDecl>(FD);
127
183k
    if (auto *VD = dyn_cast<VarDecl>(D))
128
131k
      return getCanonicalForwardRedeclChain<VarDecl>(VD);
129
51.7k
    if (auto *TD = dyn_cast<TagDecl>(D))
130
51.7k
      return getCanonicalForwardRedeclChain<TagDecl>(TD);
131
0
    llvm_unreachable("Bad declaration kind");
132
0
  }
133
134
11.0M
  void updateFlags(const Decl *From, Decl *To) {
135
    // Check if some flags or attrs are new in 'From' and copy into 'To'.
136
    // FIXME: Other flags or attrs?
137
11.0M
    if (From->isUsed(false) && 
!To->isUsed(false)225k
)
138
460
      To->setIsUsed();
139
11.0M
  }
140
141
  class ASTNodeImporter : public TypeVisitor<ASTNodeImporter, ExpectedType>,
142
                          public DeclVisitor<ASTNodeImporter, ExpectedDecl>,
143
                          public StmtVisitor<ASTNodeImporter, ExpectedStmt> {
144
    ASTImporter &Importer;
145
146
    // Use this instead of Importer.importInto .
147
    template <typename ImportT>
148
3.20M
    LLVM_NODISCARD Error importInto(ImportT &To, const ImportT &From) {
149
3.20M
      return Importer.importInto(To, From);
150
3.20M
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::SourceLocation>(clang::SourceLocation&, clang::SourceLocation const&)
Line
Count
Source
148
1.60M
    LLVM_NODISCARD Error importInto(ImportT &To, const ImportT &From) {
149
1.60M
      return Importer.importInto(To, From);
150
1.60M
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::DeclarationName>(clang::DeclarationName&, clang::DeclarationName const&)
Line
Count
Source
148
1.60M
    LLVM_NODISCARD Error importInto(ImportT &To, const ImportT &From) {
149
1.60M
      return Importer.importInto(To, From);
150
1.60M
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::QualType>(clang::QualType&, clang::QualType const&)
Line
Count
Source
148
875
    LLVM_NODISCARD Error importInto(ImportT &To, const ImportT &From) {
149
875
      return Importer.importInto(To, From);
150
875
    }
151
152
    // Use this to import pointers of specific type.
153
    template <typename ImportT>
154
450k
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
450k
      auto ToOrErr = Importer.Import(From);
156
450k
      if (ToOrErr)
157
450k
        To = cast_or_null<ImportT>(*ToOrErr);
158
450k
      return ToOrErr.takeError();
159
450k
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::FunctionTemplateDecl>(clang::FunctionTemplateDecl*&, clang::FunctionTemplateDecl*)
Line
Count
Source
154
12.3k
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
12.3k
      auto ToOrErr = Importer.Import(From);
156
12.3k
      if (ToOrErr)
157
12.3k
        To = cast_or_null<ImportT>(*ToOrErr);
158
12.3k
      return ToOrErr.takeError();
159
12.3k
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::Decl>(clang::Decl*&, clang::Decl*)
Line
Count
Source
154
25.4k
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
25.4k
      auto ToOrErr = Importer.Import(From);
156
25.4k
      if (ToOrErr)
157
25.4k
        To = cast_or_null<ImportT>(*ToOrErr);
158
25.4k
      return ToOrErr.takeError();
159
25.4k
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::ClassTemplateDecl>(clang::ClassTemplateDecl*&, clang::ClassTemplateDecl*)
Line
Count
Source
154
138k
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
138k
      auto ToOrErr = Importer.Import(From);
156
138k
      if (ToOrErr)
157
138k
        To = cast_or_null<ImportT>(*ToOrErr);
158
138k
      return ToOrErr.takeError();
159
138k
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::NamedDecl>(clang::NamedDecl*&, clang::NamedDecl*)
Line
Count
Source
154
11.5k
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
11.5k
      auto ToOrErr = Importer.Import(From);
156
11.5k
      if (ToOrErr)
157
11.5k
        To = cast_or_null<ImportT>(*ToOrErr);
158
11.5k
      return ToOrErr.takeError();
159
11.5k
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::ObjCInterfaceDecl>(clang::ObjCInterfaceDecl*&, clang::ObjCInterfaceDecl*)
Line
Count
Source
154
2.47k
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
2.47k
      auto ToOrErr = Importer.Import(From);
156
2.47k
      if (ToOrErr)
157
2.47k
        To = cast_or_null<ImportT>(*ToOrErr);
158
2.47k
      return ToOrErr.takeError();
159
2.47k
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::ObjCCategoryDecl>(clang::ObjCCategoryDecl*&, clang::ObjCCategoryDecl*)
Line
Count
Source
154
6
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
6
      auto ToOrErr = Importer.Import(From);
156
6
      if (ToOrErr)
157
6
        To = cast_or_null<ImportT>(*ToOrErr);
158
6
      return ToOrErr.takeError();
159
6
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::ObjCPropertyDecl>(clang::ObjCPropertyDecl*&, clang::ObjCPropertyDecl*)
Line
Count
Source
154
8
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
8
      auto ToOrErr = Importer.Import(From);
156
8
      if (ToOrErr)
157
8
        To = cast_or_null<ImportT>(*ToOrErr);
158
8
      return ToOrErr.takeError();
159
8
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::ObjCIvarDecl>(clang::ObjCIvarDecl*&, clang::ObjCIvarDecl*)
Line
Count
Source
154
8
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
8
      auto ToOrErr = Importer.Import(From);
156
8
      if (ToOrErr)
157
8
        To = cast_or_null<ImportT>(*ToOrErr);
158
8
      return ToOrErr.takeError();
159
8
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::CXXRecordDecl>(clang::CXXRecordDecl*&, clang::CXXRecordDecl*)
Line
Count
Source
154
106k
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
106k
      auto ToOrErr = Importer.Import(From);
156
106k
      if (ToOrErr)
157
106k
        To = cast_or_null<ImportT>(*ToOrErr);
158
106k
      return ToOrErr.takeError();
159
106k
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::VarDecl>(clang::VarDecl*&, clang::VarDecl*)
Line
Count
Source
154
414
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
414
      auto ToOrErr = Importer.Import(From);
156
414
      if (ToOrErr)
157
414
        To = cast_or_null<ImportT>(*ToOrErr);
158
414
      return ToOrErr.takeError();
159
414
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::VarTemplateDecl>(clang::VarTemplateDecl*&, clang::VarTemplateDecl*)
Line
Count
Source
154
16
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
16
      auto ToOrErr = Importer.Import(From);
156
16
      if (ToOrErr)
157
16
        To = cast_or_null<ImportT>(*ToOrErr);
158
16
      return ToOrErr.takeError();
159
16
    }
llvm::Error clang::ASTNodeImporter::importInto<clang::FunctionDecl>(clang::FunctionDecl*&, clang::FunctionDecl*)
Line
Count
Source
154
152k
    LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
155
152k
      auto ToOrErr = Importer.Import(From);
156
152k
      if (ToOrErr)
157
152k
        To = cast_or_null<ImportT>(*ToOrErr);
158
152k
      return ToOrErr.takeError();
159
152k
    }
160
161
    // Call the import function of ASTImporter for a baseclass of type `T` and
162
    // cast the return value to `T`.
163
    template <typename T>
164
    auto import(T *From)
165
        -> std::conditional_t<std::is_base_of<Type, T>::value,
166
16.8M
                              Expected<const T *>, Expected<T *>> {
167
16.8M
      auto ToOrErr = Importer.Import(From);
168
16.8M
      if (!ToOrErr)
169
517
        return ToOrErr.takeError();
170
16.8M
      return cast_or_null<T>(*ToOrErr);
171
16.8M
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::Type>::value, llvm::Expected<clang::Type const*>, llvm::Expected<clang::Type*> >::type clang::ASTNodeImporter::import<clang::Type>(clang::Type*)
Line
Count
Source
166
2
                              Expected<const T *>, Expected<T *>> {
167
2
      auto ToOrErr = Importer.Import(From);
168
2
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
2
      return cast_or_null<T>(*ToOrErr);
171
2
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::TemplateTypeParmType>::value, llvm::Expected<clang::TemplateTypeParmType const*>, llvm::Expected<clang::TemplateTypeParmType*> >::type clang::ASTNodeImporter::import<clang::TemplateTypeParmType>(clang::TemplateTypeParmType*)
Line
Count
Source
166
49.6k
                              Expected<const T *>, Expected<T *>> {
167
49.6k
      auto ToOrErr = Importer.Import(From);
168
49.6k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
49.6k
      return cast_or_null<T>(*ToOrErr);
171
49.6k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::CXXDestructorDecl>::value, llvm::Expected<clang::CXXDestructorDecl const*>, llvm::Expected<clang::CXXDestructorDecl*> >::type clang::ASTNodeImporter::import<clang::CXXDestructorDecl>(clang::CXXDestructorDecl*)
Line
Count
Source
166
808
                              Expected<const T *>, Expected<T *>> {
167
808
      auto ToOrErr = Importer.Import(From);
168
808
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
808
      return cast_or_null<T>(*ToOrErr);
171
808
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::Expr>::value, llvm::Expected<clang::Expr const*>, llvm::Expected<clang::Expr*> >::type clang::ASTNodeImporter::import<clang::Expr>(clang::Expr*)
Line
Count
Source
166
4.84M
                              Expected<const T *>, Expected<T *>> {
167
4.84M
      auto ToOrErr = Importer.Import(From);
168
4.84M
      if (!ToOrErr)
169
16
        return ToOrErr.takeError();
170
4.84M
      return cast_or_null<T>(*ToOrErr);
171
4.84M
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ValueDecl>::value, llvm::Expected<clang::ValueDecl const*>, llvm::Expected<clang::ValueDecl*> >::type clang::ASTNodeImporter::import<clang::ValueDecl>(clang::ValueDecl*)
Line
Count
Source
166
987k
                              Expected<const T *>, Expected<T *>> {
167
987k
      auto ToOrErr = Importer.Import(From);
168
987k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
987k
      return cast_or_null<T>(*ToOrErr);
171
987k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::TypeSourceInfo>::value, llvm::Expected<clang::TypeSourceInfo const*>, llvm::Expected<clang::TypeSourceInfo*> >::type clang::ASTNodeImporter::import<clang::TypeSourceInfo>(clang::TypeSourceInfo*)
Line
Count
Source
166
2.11M
                              Expected<const T *>, Expected<T *>> {
167
2.11M
      auto ToOrErr = Importer.Import(From);
168
2.11M
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
2.11M
      return cast_or_null<T>(*ToOrErr);
171
2.11M
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::Decl>::value, llvm::Expected<clang::Decl const*>, llvm::Expected<clang::Decl*> >::type clang::ASTNodeImporter::import<clang::Decl>(clang::Decl*)
Line
Count
Source
166
1.18M
                              Expected<const T *>, Expected<T *>> {
167
1.18M
      auto ToOrErr = Importer.Import(From);
168
1.18M
      if (!ToOrErr)
169
379
        return ToOrErr.takeError();
170
1.18M
      return cast_or_null<T>(*ToOrErr);
171
1.18M
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::VarDecl>::value, llvm::Expected<clang::VarDecl const*>, llvm::Expected<clang::VarDecl*> >::type clang::ASTNodeImporter::import<clang::VarDecl>(clang::VarDecl*)
Line
Count
Source
166
217k
                              Expected<const T *>, Expected<T *>> {
167
217k
      auto ToOrErr = Importer.Import(From);
168
217k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
217k
      return cast_or_null<T>(*ToOrErr);
171
217k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::UnresolvedUsingTypenameDecl>::value, llvm::Expected<clang::UnresolvedUsingTypenameDecl const*>, llvm::Expected<clang::UnresolvedUsingTypenameDecl*> >::type clang::ASTNodeImporter::import<clang::UnresolvedUsingTypenameDecl>(clang::UnresolvedUsingTypenameDecl*)
Line
Count
Source
166
196
                              Expected<const T *>, Expected<T *>> {
167
196
      auto ToOrErr = Importer.Import(From);
168
196
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
196
      return cast_or_null<T>(*ToOrErr);
171
196
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::TypedefNameDecl>::value, llvm::Expected<clang::TypedefNameDecl const*>, llvm::Expected<clang::TypedefNameDecl*> >::type clang::ASTNodeImporter::import<clang::TypedefNameDecl>(clang::TypedefNameDecl*)
Line
Count
Source
166
168k
                              Expected<const T *>, Expected<T *>> {
167
168k
      auto ToOrErr = Importer.Import(From);
168
168k
      if (!ToOrErr)
169
4
        return ToOrErr.takeError();
170
168k
      return cast_or_null<T>(*ToOrErr);
171
168k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::UsingShadowDecl>::value, llvm::Expected<clang::UsingShadowDecl const*>, llvm::Expected<clang::UsingShadowDecl*> >::type clang::ASTNodeImporter::import<clang::UsingShadowDecl>(clang::UsingShadowDecl*)
Line
Count
Source
166
12.7k
                              Expected<const T *>, Expected<T *>> {
167
12.7k
      auto ToOrErr = Importer.Import(From);
168
12.7k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
12.7k
      return cast_or_null<T>(*ToOrErr);
171
12.7k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ConceptDecl>::value, llvm::Expected<clang::ConceptDecl const*>, llvm::Expected<clang::ConceptDecl*> >::type clang::ASTNodeImporter::import<clang::ConceptDecl>(clang::ConceptDecl*)
Line
Count
Source
166
470
                              Expected<const T *>, Expected<T *>> {
167
470
      auto ToOrErr = Importer.Import(From);
168
470
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
470
      return cast_or_null<T>(*ToOrErr);
171
470
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::CXXRecordDecl>::value, llvm::Expected<clang::CXXRecordDecl const*>, llvm::Expected<clang::CXXRecordDecl*> >::type clang::ASTNodeImporter::import<clang::CXXRecordDecl>(clang::CXXRecordDecl*)
Line
Count
Source
166
263k
                              Expected<const T *>, Expected<T *>> {
167
263k
      auto ToOrErr = Importer.Import(From);
168
263k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
263k
      return cast_or_null<T>(*ToOrErr);
171
263k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::RecordDecl>::value, llvm::Expected<clang::RecordDecl const*>, llvm::Expected<clang::RecordDecl*> >::type clang::ASTNodeImporter::import<clang::RecordDecl>(clang::RecordDecl*)
Line
Count
Source
166
86.7k
                              Expected<const T *>, Expected<T *>> {
167
86.7k
      auto ToOrErr = Importer.Import(From);
168
86.7k
      if (!ToOrErr)
169
23
        return ToOrErr.takeError();
170
86.7k
      return cast_or_null<T>(*ToOrErr);
171
86.7k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::EnumDecl>::value, llvm::Expected<clang::EnumDecl const*>, llvm::Expected<clang::EnumDecl*> >::type clang::ASTNodeImporter::import<clang::EnumDecl>(clang::EnumDecl*)
Line
Count
Source
166
2.49k
                              Expected<const T *>, Expected<T *>> {
167
2.49k
      auto ToOrErr = Importer.Import(From);
168
2.49k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
2.49k
      return cast_or_null<T>(*ToOrErr);
171
2.49k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::TemplateTypeParmDecl>::value, llvm::Expected<clang::TemplateTypeParmDecl const*>, llvm::Expected<clang::TemplateTypeParmDecl*> >::type clang::ASTNodeImporter::import<clang::TemplateTypeParmDecl>(clang::TemplateTypeParmDecl*)
Line
Count
Source
166
258k
                              Expected<const T *>, Expected<T *>> {
167
258k
      auto ToOrErr = Importer.Import(From);
168
258k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
258k
      return cast_or_null<T>(*ToOrErr);
171
258k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::NestedNameSpecifier>::value, llvm::Expected<clang::NestedNameSpecifier const*>, llvm::Expected<clang::NestedNameSpecifier*> >::type clang::ASTNodeImporter::import<clang::NestedNameSpecifier>(clang::NestedNameSpecifier*)
Line
Count
Source
166
149k
                              Expected<const T *>, Expected<T *>> {
167
149k
      auto ToOrErr = Importer.Import(From);
168
149k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
149k
      return cast_or_null<T>(*ToOrErr);
171
149k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::TagDecl>::value, llvm::Expected<clang::TagDecl const*>, llvm::Expected<clang::TagDecl*> >::type clang::ASTNodeImporter::import<clang::TagDecl>(clang::TagDecl*)
Line
Count
Source
166
39.0k
                              Expected<const T *>, Expected<T *>> {
167
39.0k
      auto ToOrErr = Importer.Import(From);
168
39.0k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
39.0k
      return cast_or_null<T>(*ToOrErr);
171
39.0k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ObjCInterfaceDecl>::value, llvm::Expected<clang::ObjCInterfaceDecl const*>, llvm::Expected<clang::ObjCInterfaceDecl*> >::type clang::ASTNodeImporter::import<clang::ObjCInterfaceDecl>(clang::ObjCInterfaceDecl*)
Line
Count
Source
166
2.99k
                              Expected<const T *>, Expected<T *>> {
167
2.99k
      auto ToOrErr = Importer.Import(From);
168
2.99k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
2.99k
      return cast_or_null<T>(*ToOrErr);
171
2.99k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ObjCProtocolDecl>::value, llvm::Expected<clang::ObjCProtocolDecl const*>, llvm::Expected<clang::ObjCProtocolDecl*> >::type clang::ASTNodeImporter::import<clang::ObjCProtocolDecl>(clang::ObjCProtocolDecl*)
Line
Count
Source
166
823
                              Expected<const T *>, Expected<T *>> {
167
823
      auto ToOrErr = Importer.Import(From);
168
823
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
823
      return cast_or_null<T>(*ToOrErr);
171
823
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::CXXMethodDecl>::value, llvm::Expected<clang::CXXMethodDecl const*>, llvm::Expected<clang::CXXMethodDecl*> >::type clang::ASTNodeImporter::import<clang::CXXMethodDecl>(clang::CXXMethodDecl*)
Line
Count
Source
166
32.1k
                              Expected<const T *>, Expected<T *>> {
167
32.1k
      auto ToOrErr = Importer.Import(From);
168
32.1k
      if (!ToOrErr)
169
4
        return ToOrErr.takeError();
170
32.1k
      return cast_or_null<T>(*ToOrErr);
171
32.1k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::NamespaceDecl>::value, llvm::Expected<clang::NamespaceDecl const*>, llvm::Expected<clang::NamespaceDecl*> >::type clang::ASTNodeImporter::import<clang::NamespaceDecl>(clang::NamespaceDecl*)
Line
Count
Source
166
128
                              Expected<const T *>, Expected<T *>> {
167
128
      auto ToOrErr = Importer.Import(From);
168
128
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
128
      return cast_or_null<T>(*ToOrErr);
171
128
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::TypeAliasDecl>::value, llvm::Expected<clang::TypeAliasDecl const*>, llvm::Expected<clang::TypeAliasDecl*> >::type clang::ASTNodeImporter::import<clang::TypeAliasDecl>(clang::TypeAliasDecl*)
Line
Count
Source
166
5.40k
                              Expected<const T *>, Expected<T *>> {
167
5.40k
      auto ToOrErr = Importer.Import(From);
168
5.40k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
5.40k
      return cast_or_null<T>(*ToOrErr);
171
5.40k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::LabelStmt>::value, llvm::Expected<clang::LabelStmt const*>, llvm::Expected<clang::LabelStmt*> >::type clang::ASTNodeImporter::import<clang::LabelStmt>(clang::LabelStmt*)
Line
Count
Source
166
15
                              Expected<const T *>, Expected<T *>> {
167
15
      auto ToOrErr = Importer.Import(From);
168
15
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
15
      return cast_or_null<T>(*ToOrErr);
171
15
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::FunctionDecl>::value, llvm::Expected<clang::FunctionDecl const*>, llvm::Expected<clang::FunctionDecl*> >::type clang::ASTNodeImporter::import<clang::FunctionDecl>(clang::FunctionDecl*)
Line
Count
Source
166
936k
                              Expected<const T *>, Expected<T *>> {
167
936k
      auto ToOrErr = Importer.Import(From);
168
936k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
936k
      return cast_or_null<T>(*ToOrErr);
171
936k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::FunctionTemplateDecl>::value, llvm::Expected<clang::FunctionTemplateDecl const*>, llvm::Expected<clang::FunctionTemplateDecl*> >::type clang::ASTNodeImporter::import<clang::FunctionTemplateDecl>(clang::FunctionTemplateDecl*)
Line
Count
Source
166
85.1k
                              Expected<const T *>, Expected<T *>> {
167
85.1k
      auto ToOrErr = Importer.Import(From);
168
85.1k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
85.1k
      return cast_or_null<T>(*ToOrErr);
171
85.1k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::Stmt>::value, llvm::Expected<clang::Stmt const*>, llvm::Expected<clang::Stmt*> >::type clang::ASTNodeImporter::import<clang::Stmt>(clang::Stmt*)
Line
Count
Source
166
894k
                              Expected<const T *>, Expected<T *>> {
167
894k
      auto ToOrErr = Importer.Import(From);
168
894k
      if (!ToOrErr)
169
56
        return ToOrErr.takeError();
170
894k
      return cast_or_null<T>(*ToOrErr);
171
894k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ParmVarDecl>::value, llvm::Expected<clang::ParmVarDecl const*>, llvm::Expected<clang::ParmVarDecl*> >::type clang::ASTNodeImporter::import<clang::ParmVarDecl>(clang::ParmVarDecl*)
Line
Count
Source
166
679k
                              Expected<const T *>, Expected<T *>> {
167
679k
      auto ToOrErr = Importer.Import(From);
168
679k
      if (!ToOrErr)
169
35
        return ToOrErr.takeError();
170
679k
      return cast_or_null<T>(*ToOrErr);
171
679k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::CXXConstructorDecl>::value, llvm::Expected<clang::CXXConstructorDecl const*>, llvm::Expected<clang::CXXConstructorDecl*> >::type clang::ASTNodeImporter::import<clang::CXXConstructorDecl>(clang::CXXConstructorDecl*)
Line
Count
Source
166
13.0k
                              Expected<const T *>, Expected<T *>> {
167
13.0k
      auto ToOrErr = Importer.Import(From);
168
13.0k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
13.0k
      return cast_or_null<T>(*ToOrErr);
171
13.0k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::CXXCtorInitializer>::value, llvm::Expected<clang::CXXCtorInitializer const*>, llvm::Expected<clang::CXXCtorInitializer*> >::type clang::ASTNodeImporter::import<clang::CXXCtorInitializer>(clang::CXXCtorInitializer*)
Line
Count
Source
166
36.4k
                              Expected<const T *>, Expected<T *>> {
167
36.4k
      auto ToOrErr = Importer.Import(From);
168
36.4k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
36.4k
      return cast_or_null<T>(*ToOrErr);
171
36.4k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::NamedDecl>::value, llvm::Expected<clang::NamedDecl const*>, llvm::Expected<clang::NamedDecl*> >::type clang::ASTNodeImporter::import<clang::NamedDecl>(clang::NamedDecl*)
Line
Count
Source
166
3.66M
                              Expected<const T *>, Expected<T *>> {
167
3.66M
      auto ToOrErr = Importer.Import(From);
168
3.66M
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
3.66M
      return cast_or_null<T>(*ToOrErr);
171
3.66M
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::BindingDecl>::value, llvm::Expected<clang::BindingDecl const*>, llvm::Expected<clang::BindingDecl*> >::type clang::ASTNodeImporter::import<clang::BindingDecl>(clang::BindingDecl*)
Line
Count
Source
166
96
                              Expected<const T *>, Expected<T *>> {
167
96
      auto ToOrErr = Importer.Import(From);
168
96
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
96
      return cast_or_null<T>(*ToOrErr);
171
96
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::VarTemplateDecl>::value, llvm::Expected<clang::VarTemplateDecl const*>, llvm::Expected<clang::VarTemplateDecl*> >::type clang::ASTNodeImporter::import<clang::VarTemplateDecl>(clang::VarTemplateDecl*)
Line
Count
Source
166
219
                              Expected<const T *>, Expected<T *>> {
167
219
      auto ToOrErr = Importer.Import(From);
168
219
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
219
      return cast_or_null<T>(*ToOrErr);
171
219
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ConstructorUsingShadowDecl>::value, llvm::Expected<clang::ConstructorUsingShadowDecl const*>, llvm::Expected<clang::ConstructorUsingShadowDecl*> >::type clang::ASTNodeImporter::import<clang::ConstructorUsingShadowDecl>(clang::ConstructorUsingShadowDecl*)
Line
Count
Source
166
171
                              Expected<const T *>, Expected<T *>> {
167
171
      auto ToOrErr = Importer.Import(From);
168
171
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
171
      return cast_or_null<T>(*ToOrErr);
171
171
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ObjCCategoryImplDecl>::value, llvm::Expected<clang::ObjCCategoryImplDecl const*>, llvm::Expected<clang::ObjCCategoryImplDecl*> >::type clang::ASTNodeImporter::import<clang::ObjCCategoryImplDecl>(clang::ObjCCategoryImplDecl*)
Line
Count
Source
166
6
                              Expected<const T *>, Expected<T *>> {
167
6
      auto ToOrErr = Importer.Import(From);
168
6
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
6
      return cast_or_null<T>(*ToOrErr);
171
6
    }
Unexecuted instantiation: std::__1::conditional<std::is_base_of<clang::Type, clang::UsingEnumDecl>::value, llvm::Expected<clang::UsingEnumDecl const*>, llvm::Expected<clang::UsingEnumDecl*> >::type clang::ASTNodeImporter::import<clang::UsingEnumDecl>(clang::UsingEnumDecl*)
std::__1::conditional<std::is_base_of<clang::Type, clang::BaseUsingDecl>::value, llvm::Expected<clang::BaseUsingDecl const*>, llvm::Expected<clang::BaseUsingDecl*> >::type clang::ASTNodeImporter::import<clang::BaseUsingDecl>(clang::BaseUsingDecl*)
Line
Count
Source
166
13.9k
                              Expected<const T *>, Expected<T *>> {
167
13.9k
      auto ToOrErr = Importer.Import(From);
168
13.9k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
13.9k
      return cast_or_null<T>(*ToOrErr);
171
13.9k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ObjCCategoryDecl>::value, llvm::Expected<clang::ObjCCategoryDecl const*>, llvm::Expected<clang::ObjCCategoryDecl*> >::type clang::ASTNodeImporter::import<clang::ObjCCategoryDecl>(clang::ObjCCategoryDecl*)
Line
Count
Source
166
2.42k
                              Expected<const T *>, Expected<T *>> {
167
2.42k
      auto ToOrErr = Importer.Import(From);
168
2.42k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
2.42k
      return cast_or_null<T>(*ToOrErr);
171
2.42k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ObjCImplementationDecl>::value, llvm::Expected<clang::ObjCImplementationDecl const*>, llvm::Expected<clang::ObjCImplementationDecl*> >::type clang::ASTNodeImporter::import<clang::ObjCImplementationDecl>(clang::ObjCImplementationDecl*)
Line
Count
Source
166
8
                              Expected<const T *>, Expected<T *>> {
167
8
      auto ToOrErr = Importer.Import(From);
168
8
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
8
      return cast_or_null<T>(*ToOrErr);
171
8
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ObjCTypeParamDecl>::value, llvm::Expected<clang::ObjCTypeParamDecl const*>, llvm::Expected<clang::ObjCTypeParamDecl*> >::type clang::ASTNodeImporter::import<clang::ObjCTypeParamDecl>(clang::ObjCTypeParamDecl*)
Line
Count
Source
166
390
                              Expected<const T *>, Expected<T *>> {
167
390
      auto ToOrErr = Importer.Import(From);
168
390
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
390
      return cast_or_null<T>(*ToOrErr);
171
390
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ObjCMethodDecl>::value, llvm::Expected<clang::ObjCMethodDecl const*>, llvm::Expected<clang::ObjCMethodDecl*> >::type clang::ASTNodeImporter::import<clang::ObjCMethodDecl>(clang::ObjCMethodDecl*)
Line
Count
Source
166
4.62k
                              Expected<const T *>, Expected<T *>> {
167
4.62k
      auto ToOrErr = Importer.Import(From);
168
4.62k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
4.62k
      return cast_or_null<T>(*ToOrErr);
171
4.62k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ObjCIvarDecl>::value, llvm::Expected<clang::ObjCIvarDecl const*>, llvm::Expected<clang::ObjCIvarDecl*> >::type clang::ASTNodeImporter::import<clang::ObjCIvarDecl>(clang::ObjCIvarDecl*)
Line
Count
Source
166
2.31k
                              Expected<const T *>, Expected<T *>> {
167
2.31k
      auto ToOrErr = Importer.Import(From);
168
2.31k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
2.31k
      return cast_or_null<T>(*ToOrErr);
171
2.31k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::FieldDecl>::value, llvm::Expected<clang::FieldDecl const*>, llvm::Expected<clang::FieldDecl*> >::type clang::ASTNodeImporter::import<clang::FieldDecl>(clang::FieldDecl*)
Line
Count
Source
166
835
                              Expected<const T *>, Expected<T *>> {
167
835
      auto ToOrErr = Importer.Import(From);
168
835
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
835
      return cast_or_null<T>(*ToOrErr);
171
835
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::VarTemplatePartialSpecializationDecl>::value, llvm::Expected<clang::VarTemplatePartialSpecializationDecl const*>, llvm::Expected<clang::VarTemplatePartialSpecializationDecl*> >::type clang::ASTNodeImporter::import<clang::VarTemplatePartialSpecializationDecl>(clang::VarTemplatePartialSpecializationDecl*)
Line
Count
Source
166
10
                              Expected<const T *>, Expected<T *>> {
167
10
      auto ToOrErr = Importer.Import(From);
168
10
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
10
      return cast_or_null<T>(*ToOrErr);
171
10
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::StringLiteral>::value, llvm::Expected<clang::StringLiteral const*>, llvm::Expected<clang::StringLiteral*> >::type clang::ASTNodeImporter::import<clang::StringLiteral>(clang::StringLiteral*)
Line
Count
Source
166
7.99k
                              Expected<const T *>, Expected<T *>> {
167
7.99k
      auto ToOrErr = Importer.Import(From);
168
7.99k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
7.99k
      return cast_or_null<T>(*ToOrErr);
171
7.99k
    }
Unexecuted instantiation: std::__1::conditional<std::is_base_of<clang::Type, clang::AddrLabelExpr>::value, llvm::Expected<clang::AddrLabelExpr const*>, llvm::Expected<clang::AddrLabelExpr*> >::type clang::ASTNodeImporter::import<clang::AddrLabelExpr>(clang::AddrLabelExpr*)
std::__1::conditional<std::is_base_of<clang::Type, clang::LabelDecl>::value, llvm::Expected<clang::LabelDecl const*>, llvm::Expected<clang::LabelDecl*> >::type clang::ASTNodeImporter::import<clang::LabelDecl>(clang::LabelDecl*)
Line
Count
Source
166
68
                              Expected<const T *>, Expected<T *>> {
167
68
      auto ToOrErr = Importer.Import(From);
168
68
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
68
      return cast_or_null<T>(*ToOrErr);
171
68
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::Attr>::value, llvm::Expected<clang::Attr const*>, llvm::Expected<clang::Attr*> >::type clang::ASTNodeImporter::import<clang::Attr>(clang::Attr*)
Line
Count
Source
166
8
                              Expected<const T *>, Expected<T *>> {
167
8
      auto ToOrErr = Importer.Import(From);
168
8
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
8
      return cast_or_null<T>(*ToOrErr);
171
8
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::SwitchCase>::value, llvm::Expected<clang::SwitchCase const*>, llvm::Expected<clang::SwitchCase*> >::type clang::ASTNodeImporter::import<clang::SwitchCase>(clang::SwitchCase*)
Line
Count
Source
166
2.61k
                              Expected<const T *>, Expected<T *>> {
167
2.61k
      auto ToOrErr = Importer.Import(From);
168
2.61k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
2.61k
      return cast_or_null<T>(*ToOrErr);
171
2.61k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::CompoundStmt>::value, llvm::Expected<clang::CompoundStmt const*>, llvm::Expected<clang::CompoundStmt*> >::type clang::ASTNodeImporter::import<clang::CompoundStmt>(clang::CompoundStmt*)
Line
Count
Source
166
12
                              Expected<const T *>, Expected<T *>> {
167
12
      auto ToOrErr = Importer.Import(From);
168
12
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
12
      return cast_or_null<T>(*ToOrErr);
171
12
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::CXXCatchStmt>::value, llvm::Expected<clang::CXXCatchStmt const*>, llvm::Expected<clang::CXXCatchStmt*> >::type clang::ASTNodeImporter::import<clang::CXXCatchStmt>(clang::CXXCatchStmt*)
Line
Count
Source
166
10
                              Expected<const T *>, Expected<T *>> {
167
10
      auto ToOrErr = Importer.Import(From);
168
10
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
10
      return cast_or_null<T>(*ToOrErr);
171
10
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::DeclStmt>::value, llvm::Expected<clang::DeclStmt const*>, llvm::Expected<clang::DeclStmt*> >::type clang::ASTNodeImporter::import<clang::DeclStmt>(clang::DeclStmt*)
Line
Count
Source
166
788
                              Expected<const T *>, Expected<T *>> {
167
788
      auto ToOrErr = Importer.Import(From);
168
788
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
788
      return cast_or_null<T>(*ToOrErr);
171
788
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ObjCAtFinallyStmt>::value, llvm::Expected<clang::ObjCAtFinallyStmt const*>, llvm::Expected<clang::ObjCAtFinallyStmt*> >::type clang::ASTNodeImporter::import<clang::ObjCAtFinallyStmt>(clang::ObjCAtFinallyStmt*)
Line
Count
Source
166
6
                              Expected<const T *>, Expected<T *>> {
167
6
      auto ToOrErr = Importer.Import(From);
168
6
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
6
      return cast_or_null<T>(*ToOrErr);
171
6
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::ObjCAtCatchStmt>::value, llvm::Expected<clang::ObjCAtCatchStmt const*>, llvm::Expected<clang::ObjCAtCatchStmt*> >::type clang::ASTNodeImporter::import<clang::ObjCAtCatchStmt>(clang::ObjCAtCatchStmt*)
Line
Count
Source
166
6
                              Expected<const T *>, Expected<T *>> {
167
6
      auto ToOrErr = Importer.Import(From);
168
6
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
6
      return cast_or_null<T>(*ToOrErr);
171
6
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::OpaqueValueExpr>::value, llvm::Expected<clang::OpaqueValueExpr const*>, llvm::Expected<clang::OpaqueValueExpr*> >::type clang::ASTNodeImporter::import<clang::OpaqueValueExpr>(clang::OpaqueValueExpr*)
Line
Count
Source
166
72
                              Expected<const T *>, Expected<T *>> {
167
72
      auto ToOrErr = Importer.Import(From);
168
72
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
72
      return cast_or_null<T>(*ToOrErr);
171
72
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::CXXBaseSpecifier>::value, llvm::Expected<clang::CXXBaseSpecifier const*>, llvm::Expected<clang::CXXBaseSpecifier*> >::type clang::ASTNodeImporter::import<clang::CXXBaseSpecifier>(clang::CXXBaseSpecifier*)
Line
Count
Source
166
1.47k
                              Expected<const T *>, Expected<T *>> {
167
1.47k
      auto ToOrErr = Importer.Import(From);
168
1.47k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
1.47k
      return cast_or_null<T>(*ToOrErr);
171
1.47k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::LifetimeExtendedTemporaryDecl>::value, llvm::Expected<clang::LifetimeExtendedTemporaryDecl const*>, llvm::Expected<clang::LifetimeExtendedTemporaryDecl*> >::type clang::ASTNodeImporter::import<clang::LifetimeExtendedTemporaryDecl>(clang::LifetimeExtendedTemporaryDecl*)
Line
Count
Source
166
4.81k
                              Expected<const T *>, Expected<T *>> {
167
4.81k
      auto ToOrErr = Importer.Import(From);
168
4.81k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
4.81k
      return cast_or_null<T>(*ToOrErr);
171
4.81k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::InitListExpr>::value, llvm::Expected<clang::InitListExpr const*>, llvm::Expected<clang::InitListExpr*> >::type clang::ASTNodeImporter::import<clang::InitListExpr>(clang::InitListExpr*)
Line
Count
Source
166
416
                              Expected<const T *>, Expected<T *>> {
167
416
      auto ToOrErr = Importer.Import(From);
168
416
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
416
      return cast_or_null<T>(*ToOrErr);
171
416
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::NonTypeTemplateParmDecl>::value, llvm::Expected<clang::NonTypeTemplateParmDecl const*>, llvm::Expected<clang::NonTypeTemplateParmDecl*> >::type clang::ASTNodeImporter::import<clang::NonTypeTemplateParmDecl>(clang::NonTypeTemplateParmDecl*)
Line
Count
Source
166
19.5k
                              Expected<const T *>, Expected<T *>> {
167
19.5k
      auto ToOrErr = Importer.Import(From);
168
19.5k
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
19.5k
      return cast_or_null<T>(*ToOrErr);
171
19.5k
    }
std::__1::conditional<std::is_base_of<clang::Type, clang::UnresolvedLookupExpr>::value, llvm::Expected<clang::UnresolvedLookupExpr const*>, llvm::Expected<clang::UnresolvedLookupExpr*> >::type clang::ASTNodeImporter::import<clang::UnresolvedLookupExpr>(clang::UnresolvedLookupExpr*)
Line
Count
Source
166
16
                              Expected<const T *>, Expected<T *>> {
167
16
      auto ToOrErr = Importer.Import(From);
168
16
      if (!ToOrErr)
169
0
        return ToOrErr.takeError();
170
16
      return cast_or_null<T>(*ToOrErr);
171
16
    }
172
173
    template <typename T>
174
216k
    auto import(const T *From) {
175
216k
      return import(const_cast<T *>(From));
176
216k
    }
auto clang::ASTNodeImporter::import<clang::Type>(clang::Type const*)
Line
Count
Source
174
2
    auto import(const T *From) {
175
2
      return import(const_cast<T *>(From));
176
2
    }
auto clang::ASTNodeImporter::import<clang::TemplateTypeParmType>(clang::TemplateTypeParmType const*)
Line
Count
Source
174
49.6k
    auto import(const T *From) {
175
49.6k
      return import(const_cast<T *>(From));
176
49.6k
    }
auto clang::ASTNodeImporter::import<clang::Expr>(clang::Expr const*)
Line
Count
Source
174
30.8k
    auto import(const T *From) {
175
30.8k
      return import(const_cast<T *>(From));
176
30.8k
    }
auto clang::ASTNodeImporter::import<clang::CXXDestructorDecl>(clang::CXXDestructorDecl const*)
Line
Count
Source
174
808
    auto import(const T *From) {
175
808
      return import(const_cast<T *>(From));
176
808
    }
auto clang::ASTNodeImporter::import<clang::CXXMethodDecl>(clang::CXXMethodDecl const*)
Line
Count
Source
174
1.48k
    auto import(const T *From) {
175
1.48k
      return import(const_cast<T *>(From));
176
1.48k
    }
auto clang::ASTNodeImporter::import<clang::Attr>(clang::Attr const*)
Line
Count
Source
174
8
    auto import(const T *From) {
175
8
      return import(const_cast<T *>(From));
176
8
    }
auto clang::ASTNodeImporter::import<clang::VarDecl>(clang::VarDecl const*)
Line
Count
Source
174
133k
    auto import(const T *From) {
175
133k
      return import(const_cast<T *>(From));
176
133k
    }
auto clang::ASTNodeImporter::import<clang::TypeSourceInfo>(clang::TypeSourceInfo const*)
Line
Count
Source
174
22
    auto import(const T *From) {
175
22
      return import(const_cast<T *>(From));
176
22
    }
Unexecuted instantiation: auto clang::ASTNodeImporter::import<clang::FieldDecl>(clang::FieldDecl const*)
Unexecuted instantiation: auto clang::ASTNodeImporter::import<clang::AddrLabelExpr>(clang::AddrLabelExpr const*)
Unexecuted instantiation: auto clang::ASTNodeImporter::import<clang::ValueDecl>(clang::ValueDecl const*)
Unexecuted instantiation: auto clang::ASTNodeImporter::import<clang::CXXRecordDecl>(clang::CXXRecordDecl const*)
Unexecuted instantiation: auto clang::ASTNodeImporter::import<clang::Decl>(clang::Decl const*)
177
178
    // Call the import function of ASTImporter for type `T`.
179
    template <typename T>
180
25.9M
    Expected<T> import(const T &From) {
181
25.9M
      return Importer.Import(From);
182
25.9M
    }
llvm::Expected<clang::SourceLocation> clang::ASTNodeImporter::import<clang::SourceLocation>(clang::SourceLocation const&)
Line
Count
Source
180
12.1M
    Expected<T> import(const T &From) {
181
12.1M
      return Importer.Import(From);
182
12.1M
    }
llvm::Expected<clang::QualType> clang::ASTNodeImporter::import<clang::QualType>(clang::QualType const&)
Line
Count
Source
180
7.78M
    Expected<T> import(const T &From) {
181
7.78M
      return Importer.Import(From);
182
7.78M
    }
llvm::Expected<clang::TemplateName> clang::ASTNodeImporter::import<clang::TemplateName>(clang::TemplateName const&)
Line
Count
Source
180
518k
    Expected<T> import(const T &From) {
181
518k
      return Importer.Import(From);
182
518k
    }
llvm::Expected<clang::NestedNameSpecifierLoc> clang::ASTNodeImporter::import<clang::NestedNameSpecifierLoc>(clang::NestedNameSpecifierLoc const&)
Line
Count
Source
180
2.67M
    Expected<T> import(const T &From) {
181
2.67M
      return Importer.Import(From);
182
2.67M
    }
llvm::Expected<clang::SourceRange> clang::ASTNodeImporter::import<clang::SourceRange>(clang::SourceRange const&)
Line
Count
Source
180
1.21M
    Expected<T> import(const T &From) {
181
1.21M
      return Importer.Import(From);
182
1.21M
    }
llvm::Expected<clang::InheritedConstructor> clang::ASTNodeImporter::import<clang::InheritedConstructor>(clang::InheritedConstructor const&)
Line
Count
Source
180
6
    Expected<T> import(const T &From) {
181
6
      return Importer.Import(From);
182
6
    }
llvm::Expected<clang::Selector> clang::ASTNodeImporter::import<clang::Selector>(clang::Selector const&)
Line
Count
Source
180
4.62k
    Expected<T> import(const T &From) {
181
4.62k
      return Importer.Import(From);
182
4.62k
    }
llvm::Expected<clang::DeclarationName> clang::ASTNodeImporter::import<clang::DeclarationName>(clang::DeclarationName const&)
Line
Count
Source
180
1.59M
    Expected<T> import(const T &From) {
181
1.59M
      return Importer.Import(From);
182
1.59M
    }
llvm::Expected<clang::APValue> clang::ASTNodeImporter::import<clang::APValue>(clang::APValue const&)
Line
Count
Source
180
34.6k
    Expected<T> import(const T &From) {
181
34.6k
      return Importer.Import(From);
182
34.6k
    }
llvm::Expected<llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> > clang::ASTNodeImporter::import<llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> >(llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> const&)
Line
Count
Source
180
2
    Expected<T> import(const T &From) {
181
2
      return Importer.Import(From);
182
2
    }
183
184
    // Import an Optional<T> by importing the contained T, if any.
185
    template<typename T>
186
1.08k
    Expected<Optional<T>> import(Optional<T> From) {
187
1.08k
      if (!From)
188
858
        return Optional<T>();
189
229
      return import(*From);
190
1.08k
    }
191
192
    ExplicitSpecifier importExplicitSpecifier(Error &Err,
193
                                              ExplicitSpecifier ESpec);
194
195
    // Wrapper for an overload set.
196
    template <typename ToDeclT> struct CallOverloadedCreateFun {
197
2.50M
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
2.50M
        return ToDeclT::Create(std::forward<Args>(args)...);
199
2.50M
      }
Unexecuted instantiation: decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::EmptyDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&)
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::BindingDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&)
Line
Count
Source
197
32
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
32
        return ToDeclT::Create(std::forward<Args>(args)...);
199
32
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::AccessSpecDecl>::operator()<clang::ASTContext&, clang::AccessSpecifier, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext&, clang::AccessSpecifier&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
197
52.3k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
52.3k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
52.3k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::StaticAssertDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::Expr*&, clang::StringLiteral*&, clang::SourceLocation&, bool>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::Expr*&, clang::StringLiteral*&, clang::SourceLocation&, bool&&)
Line
Count
Source
197
7.97k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
7.97k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
7.97k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::NamespaceDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, bool, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, std::nullptr_t>(clang::ASTContext&, clang::DeclContext*&, bool&&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, std::nullptr_t&&)
Line
Count
Source
197
4.00k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
4.00k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
4.00k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::NamespaceAliasDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::NamespaceDecl*&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::NamespaceDecl*&)
Line
Count
Source
197
3
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
3
        return ToDeclT::Create(std::forward<Args>(args)...);
199
3
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TypeAliasDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::TypeSourceInfo*&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::TypeSourceInfo*&)
Line
Count
Source
197
11.2k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
11.2k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
11.2k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TypedefDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::TypeSourceInfo*&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::TypeSourceInfo*&)
Line
Count
Source
197
170k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
170k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
170k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TypeAliasTemplateDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::TypeAliasDecl*&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::TypeAliasDecl*&)
Line
Count
Source
197
5.28k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
5.28k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
5.28k
      }
Unexecuted instantiation: decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::LabelDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, clang::SourceLocation&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::SourceLocation&)
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::LabelDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&)
Line
Count
Source
197
15
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
15
        return ToDeclT::Create(std::forward<Args>(args)...);
199
15
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::EnumDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::EnumDecl*&, bool, bool, bool>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::EnumDecl*&, bool&&, bool&&, bool&&)
Line
Count
Source
197
1.53k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
1.53k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
1.53k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXRecordDecl>::operator()<clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::CXXRecordDecl*, bool const&>(clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::CXXRecordDecl*&&, bool const&)
Line
Count
Source
197
52.0k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
52.0k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
52.0k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXRecordDecl>::operator()<clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::CXXRecordDecl*>(clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::CXXRecordDecl*&&)
Line
Count
Source
197
73.8k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
73.8k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
73.8k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::RecordDecl>::operator()<clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::RecordDecl*&>(clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::RecordDecl*&)
Line
Count
Source
197
133
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
133
        return ToDeclT::Create(std::forward<Args>(args)...);
199
133
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::EnumConstantDecl>::operator()<clang::ASTContext&, clang::EnumDecl*, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::Expr*&, llvm::APSInt const&>(clang::ASTContext&, clang::EnumDecl*&&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::Expr*&, llvm::APSInt const&)
Line
Count
Source
197
3.69k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
3.69k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
3.69k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXConstructorDecl>::operator()<clang::ASTContext&, clang::CXXRecordDecl*, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::ExplicitSpecifier&, bool, bool, bool, clang::ConstexprSpecKind, clang::InheritedConstructor&, clang::Expr*&>(clang::ASTContext&, clang::CXXRecordDecl*&&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::ExplicitSpecifier&, bool&&, bool&&, bool&&, clang::ConstexprSpecKind&&, clang::InheritedConstructor&, clang::Expr*&)
Line
Count
Source
197
115k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
115k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
115k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXDestructorDecl>::operator()<clang::ASTContext&, clang::CXXRecordDecl*, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, bool, bool, bool, clang::ConstexprSpecKind, clang::Expr*&>(clang::ASTContext&, clang::CXXRecordDecl*&&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, bool&&, bool&&, bool&&, clang::ConstexprSpecKind&&, clang::Expr*&)
Line
Count
Source
197
12.5k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
12.5k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
12.5k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXConversionDecl>::operator()<clang::ASTContext&, clang::CXXRecordDecl*, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, bool, bool, clang::ExplicitSpecifier&, clang::ConstexprSpecKind, clang::SourceLocation, clang::Expr*&>(clang::ASTContext&, clang::CXXRecordDecl*&&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, bool&&, bool&&, clang::ExplicitSpecifier&, clang::ConstexprSpecKind&&, clang::SourceLocation&&, clang::Expr*&)
Line
Count
Source
197
2.59k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
2.59k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
2.59k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXMethodDecl>::operator()<clang::ASTContext&, clang::CXXRecordDecl*, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, bool, bool, clang::ConstexprSpecKind, clang::SourceLocation, clang::Expr*&>(clang::ASTContext&, clang::CXXRecordDecl*&&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, bool&&, bool&&, clang::ConstexprSpecKind&&, clang::SourceLocation&&, clang::Expr*&)
Line
Count
Source
197
452k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
452k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
452k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXDeductionGuideDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::ExplicitSpecifier&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::SourceLocation&, clang::CXXConstructorDecl*&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::ExplicitSpecifier&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::SourceLocation&, clang::CXXConstructorDecl*&)
Line
Count
Source
197
44
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
44
        return ToDeclT::Create(std::forward<Args>(args)...);
199
44
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::FunctionDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, bool, bool, bool, clang::ConstexprSpecKind, clang::Expr*&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, bool&&, bool&&, bool&&, clang::ConstexprSpecKind&&, clang::Expr*&)
Line
Count
Source
197
57.9k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
57.9k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
57.9k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::FieldDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::TypeSourceInfo*&, clang::Expr*&, bool, clang::InClassInitStyle>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::TypeSourceInfo*&, clang::Expr*&, bool&&, clang::InClassInitStyle&&)
Line
Count
Source
197
50.6k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
50.6k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
50.6k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::IndirectFieldDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, llvm::MutableArrayRef<clang::NamedDecl*>&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, llvm::MutableArrayRef<clang::NamedDecl*>&)
Line
Count
Source
197
966
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
966
        return ToDeclT::Create(std::forward<Args>(args)...);
199
966
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::FriendDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, llvm::PointerUnion<clang::NamedDecl*, clang::TypeSourceInfo*>&, clang::SourceLocation&, llvm::SmallVector<clang::TemplateParameterList*, 1u>&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, llvm::PointerUnion<clang::NamedDecl*, clang::TypeSourceInfo*>&, clang::SourceLocation&, llvm::SmallVector<clang::TemplateParameterList*, 1u>&)
Line
Count
Source
197
13.9k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
13.9k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
13.9k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCIvarDecl>::operator()<clang::ASTContext&, clang::ObjCContainerDecl*, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::TypeSourceInfo*&, clang::ObjCIvarDecl::AccessControl, clang::Expr*&, bool>(clang::ASTContext&, clang::ObjCContainerDecl*&&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::TypeSourceInfo*&, clang::ObjCIvarDecl::AccessControl&&, clang::Expr*&, bool&&)
Line
Count
Source
197
1.63k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
1.63k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
1.63k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::DecompositionDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, llvm::SmallVector<clang::BindingDecl*, 6u>&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, llvm::SmallVector<clang::BindingDecl*, 6u>&)
Line
Count
Source
197
16
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
16
        return ToDeclT::Create(std::forward<Args>(args)...);
199
16
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::VarDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&)
Line
Count
Source
197
130k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
130k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
130k
      }
Unexecuted instantiation: decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ImplicitParamDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::ImplicitParamDecl::ImplicitParamKind>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::ImplicitParamDecl::ImplicitParamKind&&)
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ParmVarDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, std::nullptr_t>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, std::nullptr_t&&)
Line
Count
Source
197
678k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
678k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
678k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCMethodDecl>::operator()<clang::ASTContext&, clang::SourceLocation&, clang::SourceLocation&, clang::Selector, clang::QualType&, clang::TypeSourceInfo*&, clang::DeclContext*&, bool, bool, bool, bool, bool, bool, clang::ObjCMethodDecl::ImplementationControl, bool>(clang::ASTContext&, clang::SourceLocation&, clang::SourceLocation&, clang::Selector&&, clang::QualType&, clang::TypeSourceInfo*&, clang::DeclContext*&, bool&&, bool&&, bool&&, bool&&, bool&&, bool&&, clang::ObjCMethodDecl::ImplementationControl&&, bool&&)
Line
Count
Source
197
8.63k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
8.63k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
8.63k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCTypeParamDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::ObjCTypeParamVariance, clang::SourceLocation&, unsigned int, clang::SourceLocation&, clang::IdentifierInfo*, clang::SourceLocation&, clang::TypeSourceInfo*&>(clang::ASTContext&, clang::DeclContext*&, clang::ObjCTypeParamVariance&&, clang::SourceLocation&, unsigned int&&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::SourceLocation&, clang::TypeSourceInfo*&)
Line
Count
Source
197
390
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
390
        return ToDeclT::Create(std::forward<Args>(args)...);
199
390
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCCategoryDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::ObjCInterfaceDecl*&, std::nullptr_t, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::ObjCInterfaceDecl*&, std::nullptr_t&&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
197
2.44k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
2.44k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
2.44k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCProtocolDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::IdentifierInfo*, clang::SourceLocation&, clang::SourceLocation&, std::nullptr_t>(clang::ASTContext&, clang::DeclContext*&, clang::IdentifierInfo*&&, clang::SourceLocation&, clang::SourceLocation&, std::nullptr_t&&)
Line
Count
Source
197
375
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
375
        return ToDeclT::Create(std::forward<Args>(args)...);
199
375
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::LinkageSpecDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::LinkageSpecDecl::LanguageIDs, bool&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::LinkageSpecDecl::LanguageIDs&&, bool&)
Line
Count
Source
197
4.74k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
4.74k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
4.74k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UsingDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::DeclarationNameInfo&, bool>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::DeclarationNameInfo&, bool&&)
Line
Count
Source
197
2.91k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
2.91k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
2.91k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UsingEnumDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::EnumDecl*&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::EnumDecl*&)
Line
Count
Source
197
8
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
8
        return ToDeclT::Create(std::forward<Args>(args)...);
199
8
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ConstructorUsingShadowDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::UsingDecl*, clang::NamedDecl*, bool>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::UsingDecl*&&, clang::NamedDecl*&&, bool&&)
Line
Count
Source
197
165
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
165
        return ToDeclT::Create(std::forward<Args>(args)...);
199
165
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UsingShadowDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::BaseUsingDecl*&, clang::NamedDecl*&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::BaseUsingDecl*&, clang::NamedDecl*&)
Line
Count
Source
197
11.4k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
11.4k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
11.4k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UsingDirectiveDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::NamespaceDecl*&, clang::DeclContext*&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::NamespaceDecl*&, clang::DeclContext*&)
Line
Count
Source
197
125
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
125
        return ToDeclT::Create(std::forward<Args>(args)...);
199
125
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UnresolvedUsingValueDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::DeclarationNameInfo&, clang::SourceLocation&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::DeclarationNameInfo&, clang::SourceLocation&)
Line
Count
Source
197
2
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
2
        return ToDeclT::Create(std::forward<Args>(args)...);
199
2
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UnresolvedUsingTypenameDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::DeclarationName&, clang::SourceLocation&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::DeclarationName&, clang::SourceLocation&)
Line
Count
Source
197
196
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
196
        return ToDeclT::Create(std::forward<Args>(args)...);
199
196
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCInterfaceDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, std::nullptr_t, std::nullptr_t, clang::SourceLocation&, bool>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, std::nullptr_t&&, std::nullptr_t&&, clang::SourceLocation&, bool&&)
Line
Count
Source
197
2.32k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
2.32k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
2.32k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCCategoryImplDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::IdentifierInfo*, clang::ObjCInterfaceDecl*, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext&, clang::DeclContext*&, clang::IdentifierInfo*&&, clang::ObjCInterfaceDecl*&&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
197
4
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
4
        return ToDeclT::Create(std::forward<Args>(args)...);
199
4
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCImplementationDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::ObjCInterfaceDecl*&, clang::ObjCInterfaceDecl*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext&, clang::DeclContext*&, clang::ObjCInterfaceDecl*&, clang::ObjCInterfaceDecl*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
197
8
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
8
        return ToDeclT::Create(std::forward<Args>(args)...);
199
8
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCPropertyDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, clang::SourceLocation&, clang::SourceLocation&, clang::QualType&, clang::TypeSourceInfo*&, clang::ObjCPropertyDecl::PropertyControl>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::SourceLocation&, clang::SourceLocation&, clang::QualType&, clang::TypeSourceInfo*&, clang::ObjCPropertyDecl::PropertyControl&&)
Line
Count
Source
197
2.31k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
2.31k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
2.31k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCPropertyImplDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::ObjCPropertyDecl*&, clang::ObjCPropertyImplDecl::Kind, clang::ObjCIvarDecl*&, clang::SourceLocation&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::ObjCPropertyDecl*&, clang::ObjCPropertyImplDecl::Kind&&, clang::ObjCIvarDecl*&, clang::SourceLocation&)
Line
Count
Source
197
4
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
4
        return ToDeclT::Create(std::forward<Args>(args)...);
199
4
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TemplateTypeParmDecl>::operator()<clang::ASTContext&, clang::TranslationUnitDecl*, clang::SourceLocation&, clang::SourceLocation&, unsigned int, unsigned int, clang::IdentifierInfo*, bool, bool, bool>(clang::ASTContext&, clang::TranslationUnitDecl*&&, clang::SourceLocation&, clang::SourceLocation&, unsigned int&&, unsigned int&&, clang::IdentifierInfo*&&, bool&&, bool&&, bool&&)
Line
Count
Source
197
325k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
325k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
325k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::NonTypeTemplateParmDecl>::operator()<clang::ASTContext&, clang::TranslationUnitDecl*, clang::SourceLocation&, clang::SourceLocation&, unsigned int, unsigned int, clang::IdentifierInfo*, clang::QualType&, bool, clang::TypeSourceInfo*&>(clang::ASTContext&, clang::TranslationUnitDecl*&&, clang::SourceLocation&, clang::SourceLocation&, unsigned int&&, unsigned int&&, clang::IdentifierInfo*&&, clang::QualType&, bool&&, clang::TypeSourceInfo*&)
Line
Count
Source
197
46.0k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
46.0k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
46.0k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TemplateTemplateParmDecl>::operator()<clang::ASTContext&, clang::TranslationUnitDecl*, clang::SourceLocation&, unsigned int, unsigned int, bool, clang::IdentifierInfo*, clang::TemplateParameterList*&>(clang::ASTContext&, clang::TranslationUnitDecl*&&, clang::SourceLocation&, unsigned int&&, unsigned int&&, bool&&, clang::IdentifierInfo*&&, clang::TemplateParameterList*&)
Line
Count
Source
197
1.69k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
1.69k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
1.69k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ClassTemplateDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::CXXRecordDecl*&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::CXXRecordDecl*&)
Line
Count
Source
197
53.5k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
53.5k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
53.5k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ClassTemplatePartialSpecializationDecl>::operator()<clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::TemplateParameterList*&, clang::ClassTemplateDecl*&, llvm::ArrayRef<clang::TemplateArgument>, clang::TemplateArgumentListInfo&, clang::QualType&, clang::ClassTemplatePartialSpecializationDecl*>(clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::TemplateParameterList*&, clang::ClassTemplateDecl*&, llvm::ArrayRef<clang::TemplateArgument>&&, clang::TemplateArgumentListInfo&, clang::QualType&, clang::ClassTemplatePartialSpecializationDecl*&&)
Line
Count
Source
197
859
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
859
        return ToDeclT::Create(std::forward<Args>(args)...);
199
859
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ClassTemplateSpecializationDecl>::operator()<clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::ClassTemplateDecl*&, llvm::SmallVector<clang::TemplateArgument, 2u>&, clang::ClassTemplateSpecializationDecl*&>(clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::ClassTemplateDecl*&, llvm::SmallVector<clang::TemplateArgument, 2u>&, clang::ClassTemplateSpecializationDecl*&)
Line
Count
Source
197
62.1k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
62.1k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
62.1k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::VarTemplateDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::VarDecl*&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::VarDecl*&)
Line
Count
Source
197
219
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
219
        return ToDeclT::Create(std::forward<Args>(args)...);
199
219
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::VarTemplatePartialSpecializationDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::TemplateParameterList*&, clang::VarTemplateDecl*&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, llvm::SmallVector<clang::TemplateArgument, 2u>&, clang::TemplateArgumentListInfo&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::TemplateParameterList*&, clang::VarTemplateDecl*&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, llvm::SmallVector<clang::TemplateArgument, 2u>&, clang::TemplateArgumentListInfo&)
Line
Count
Source
197
10
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
10
        return ToDeclT::Create(std::forward<Args>(args)...);
199
10
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::VarTemplateSpecializationDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::VarTemplateDecl*&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, llvm::SmallVector<clang::TemplateArgument, 2u>&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::VarTemplateDecl*&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, llvm::SmallVector<clang::TemplateArgument, 2u>&)
Line
Count
Source
197
6
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
6
        return ToDeclT::Create(std::forward<Args>(args)...);
199
6
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::FunctionTemplateDecl>::operator()<clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::FunctionDecl*&>(clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::FunctionDecl*&)
Line
Count
Source
197
82.4k
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
82.4k
        return ToDeclT::Create(std::forward<Args>(args)...);
199
82.4k
      }
decltype(auto) clang::ASTNodeImporter::CallOverloadedCreateFun<clang::LifetimeExtendedTemporaryDecl>::operator()<clang::Expr*&, clang::ValueDecl*&, unsigned int>(clang::Expr*&, clang::ValueDecl*&, unsigned int&&)
Line
Count
Source
197
2
      template <typename... Args> decltype(auto) operator()(Args &&... args) {
198
2
        return ToDeclT::Create(std::forward<Args>(args)...);
199
2
      }
200
    };
201
202
    // Always use these functions to create a Decl during import. There are
203
    // certain tasks which must be done after the Decl was created, e.g. we
204
    // must immediately register that as an imported Decl.  The parameter `ToD`
205
    // will be set to the newly created Decl or if had been imported before
206
    // then to the already imported Decl.  Returns a bool value set to true if
207
    // the `FromD` had been imported before.
208
    template <typename ToDeclT, typename FromDeclT, typename... Args>
209
    LLVM_NODISCARD bool GetImportedOrCreateDecl(ToDeclT *&ToD, FromDeclT *FromD,
210
1.86M
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
1.86M
      CallOverloadedCreateFun<ToDeclT> OC;
215
1.86M
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
1.86M
                                            std::forward<Args>(args)...);
217
1.86M
    }
Unexecuted instantiation: bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::EmptyDecl, clang::EmptyDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&>(clang::EmptyDecl*&, clang::EmptyDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&)
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::BindingDecl, clang::BindingDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*>(clang::BindingDecl*&, clang::BindingDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&)
Line
Count
Source
210
32
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
32
      CallOverloadedCreateFun<ToDeclT> OC;
215
32
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
32
                                            std::forward<Args>(args)...);
217
32
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::AccessSpecDecl, clang::AccessSpecDecl, clang::ASTContext&, clang::AccessSpecifier, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&>(clang::AccessSpecDecl*&, clang::AccessSpecDecl*, clang::ASTContext&, clang::AccessSpecifier&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
210
52.3k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
52.3k
      CallOverloadedCreateFun<ToDeclT> OC;
215
52.3k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
52.3k
                                            std::forward<Args>(args)...);
217
52.3k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::StaticAssertDecl, clang::StaticAssertDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::Expr*&, clang::StringLiteral*&, clang::SourceLocation&, bool>(clang::StaticAssertDecl*&, clang::StaticAssertDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::Expr*&, clang::StringLiteral*&, clang::SourceLocation&, bool&&)
Line
Count
Source
210
7.97k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
7.97k
      CallOverloadedCreateFun<ToDeclT> OC;
215
7.97k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
7.97k
                                            std::forward<Args>(args)...);
217
7.97k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::NamespaceDecl, clang::NamespaceDecl, clang::ASTContext&, clang::DeclContext*&, bool, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, std::nullptr_t>(clang::NamespaceDecl*&, clang::NamespaceDecl*, clang::ASTContext&, clang::DeclContext*&, bool&&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, std::nullptr_t&&)
Line
Count
Source
210
4.00k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
4.00k
      CallOverloadedCreateFun<ToDeclT> OC;
215
4.00k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
4.00k
                                            std::forward<Args>(args)...);
217
4.00k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::NamespaceAliasDecl, clang::NamespaceAliasDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::NamespaceDecl*&>(clang::NamespaceAliasDecl*&, clang::NamespaceAliasDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::NamespaceDecl*&)
Line
Count
Source
210
3
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
3
      CallOverloadedCreateFun<ToDeclT> OC;
215
3
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
3
                                            std::forward<Args>(args)...);
217
3
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::TypeAliasTemplateDecl, clang::TypeAliasTemplateDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::TypeAliasDecl*&>(clang::TypeAliasTemplateDecl*&, clang::TypeAliasTemplateDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::TypeAliasDecl*&)
Line
Count
Source
210
5.40k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
5.40k
      CallOverloadedCreateFun<ToDeclT> OC;
215
5.40k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
5.40k
                                            std::forward<Args>(args)...);
217
5.40k
    }
Unexecuted instantiation: bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::LabelDecl, clang::LabelDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, clang::SourceLocation&>(clang::LabelDecl*&, clang::LabelDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::SourceLocation&)
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::LabelDecl, clang::LabelDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*>(clang::LabelDecl*&, clang::LabelDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&)
Line
Count
Source
210
15
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
15
      CallOverloadedCreateFun<ToDeclT> OC;
215
15
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
15
                                            std::forward<Args>(args)...);
217
15
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::EnumDecl, clang::EnumDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::EnumDecl*&, bool, bool, bool>(clang::EnumDecl*&, clang::EnumDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::EnumDecl*&, bool&&, bool&&, bool&&)
Line
Count
Source
210
1.53k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
1.53k
      CallOverloadedCreateFun<ToDeclT> OC;
215
1.53k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
1.53k
                                            std::forward<Args>(args)...);
217
1.53k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::CXXRecordDecl, clang::RecordDecl, clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::CXXRecordDecl*, bool const&>(clang::CXXRecordDecl*&, clang::RecordDecl*, clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::CXXRecordDecl*&&, bool const&)
Line
Count
Source
210
52.0k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
52.0k
      CallOverloadedCreateFun<ToDeclT> OC;
215
52.0k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
52.0k
                                            std::forward<Args>(args)...);
217
52.0k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::CXXRecordDecl, clang::RecordDecl, clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::CXXRecordDecl*>(clang::CXXRecordDecl*&, clang::RecordDecl*, clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::CXXRecordDecl*&&)
Line
Count
Source
210
74.5k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
74.5k
      CallOverloadedCreateFun<ToDeclT> OC;
215
74.5k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
74.5k
                                            std::forward<Args>(args)...);
217
74.5k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::RecordDecl, clang::RecordDecl, clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::RecordDecl*&>(clang::RecordDecl*&, clang::RecordDecl*, clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::RecordDecl*&)
Line
Count
Source
210
146
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
146
      CallOverloadedCreateFun<ToDeclT> OC;
215
146
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
146
                                            std::forward<Args>(args)...);
217
146
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::EnumConstantDecl, clang::EnumConstantDecl, clang::ASTContext&, clang::EnumDecl*, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::Expr*&, llvm::APSInt const&>(clang::EnumConstantDecl*&, clang::EnumConstantDecl*, clang::ASTContext&, clang::EnumDecl*&&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::Expr*&, llvm::APSInt const&)
Line
Count
Source
210
3.69k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
3.69k
      CallOverloadedCreateFun<ToDeclT> OC;
215
3.69k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
3.69k
                                            std::forward<Args>(args)...);
217
3.69k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::FunctionDecl, clang::FunctionDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, bool, bool, bool, clang::ConstexprSpecKind, clang::Expr*&>(clang::FunctionDecl*&, clang::FunctionDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, bool&&, bool&&, bool&&, clang::ConstexprSpecKind&&, clang::Expr*&)
Line
Count
Source
210
57.9k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
57.9k
      CallOverloadedCreateFun<ToDeclT> OC;
215
57.9k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
57.9k
                                            std::forward<Args>(args)...);
217
57.9k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::FieldDecl, clang::FieldDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::TypeSourceInfo*&, clang::Expr*&, bool, clang::InClassInitStyle>(clang::FieldDecl*&, clang::FieldDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::TypeSourceInfo*&, clang::Expr*&, bool&&, clang::InClassInitStyle&&)
Line
Count
Source
210
50.8k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
50.8k
      CallOverloadedCreateFun<ToDeclT> OC;
215
50.8k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
50.8k
                                            std::forward<Args>(args)...);
217
50.8k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::IndirectFieldDecl, clang::IndirectFieldDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, llvm::MutableArrayRef<clang::NamedDecl*>&>(clang::IndirectFieldDecl*&, clang::IndirectFieldDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, llvm::MutableArrayRef<clang::NamedDecl*>&)
Line
Count
Source
210
966
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
966
      CallOverloadedCreateFun<ToDeclT> OC;
215
966
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
966
                                            std::forward<Args>(args)...);
217
966
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::FriendDecl, clang::FriendDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, llvm::PointerUnion<clang::NamedDecl*, clang::TypeSourceInfo*>&, clang::SourceLocation&, llvm::SmallVector<clang::TemplateParameterList*, 1u>&>(clang::FriendDecl*&, clang::FriendDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, llvm::PointerUnion<clang::NamedDecl*, clang::TypeSourceInfo*>&, clang::SourceLocation&, llvm::SmallVector<clang::TemplateParameterList*, 1u>&)
Line
Count
Source
210
13.9k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
13.9k
      CallOverloadedCreateFun<ToDeclT> OC;
215
13.9k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
13.9k
                                            std::forward<Args>(args)...);
217
13.9k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ObjCIvarDecl, clang::ObjCIvarDecl, clang::ASTContext&, clang::ObjCContainerDecl*, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::TypeSourceInfo*&, clang::ObjCIvarDecl::AccessControl, clang::Expr*&, bool>(clang::ObjCIvarDecl*&, clang::ObjCIvarDecl*, clang::ASTContext&, clang::ObjCContainerDecl*&&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::TypeSourceInfo*&, clang::ObjCIvarDecl::AccessControl&&, clang::Expr*&, bool&&)
Line
Count
Source
210
1.63k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
1.63k
      CallOverloadedCreateFun<ToDeclT> OC;
215
1.63k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
1.63k
                                            std::forward<Args>(args)...);
217
1.63k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::DecompositionDecl, clang::DecompositionDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, llvm::SmallVector<clang::BindingDecl*, 6u>&>(clang::DecompositionDecl*&, clang::DecompositionDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, llvm::SmallVector<clang::BindingDecl*, 6u>&)
Line
Count
Source
210
48
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
48
      CallOverloadedCreateFun<ToDeclT> OC;
215
48
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
48
                                            std::forward<Args>(args)...);
217
48
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::VarDecl, clang::VarDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass>(clang::VarDecl*&, clang::VarDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&)
Line
Count
Source
210
130k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
130k
      CallOverloadedCreateFun<ToDeclT> OC;
215
130k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
130k
                                            std::forward<Args>(args)...);
217
130k
    }
Unexecuted instantiation: bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ImplicitParamDecl, clang::ImplicitParamDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::ImplicitParamDecl::ImplicitParamKind>(clang::ImplicitParamDecl*&, clang::ImplicitParamDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::ImplicitParamDecl::ImplicitParamKind&&)
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ParmVarDecl, clang::ParmVarDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, std::nullptr_t>(clang::ParmVarDecl*&, clang::ParmVarDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, std::nullptr_t&&)
Line
Count
Source
210
678k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
678k
      CallOverloadedCreateFun<ToDeclT> OC;
215
678k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
678k
                                            std::forward<Args>(args)...);
217
678k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ObjCMethodDecl, clang::ObjCMethodDecl, clang::ASTContext&, clang::SourceLocation&, clang::SourceLocation&, clang::Selector, clang::QualType&, clang::TypeSourceInfo*&, clang::DeclContext*&, bool, bool, bool, bool, bool, bool, clang::ObjCMethodDecl::ImplementationControl, bool>(clang::ObjCMethodDecl*&, clang::ObjCMethodDecl*, clang::ASTContext&, clang::SourceLocation&, clang::SourceLocation&, clang::Selector&&, clang::QualType&, clang::TypeSourceInfo*&, clang::DeclContext*&, bool&&, bool&&, bool&&, bool&&, bool&&, bool&&, clang::ObjCMethodDecl::ImplementationControl&&, bool&&)
Line
Count
Source
210
8.63k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
8.63k
      CallOverloadedCreateFun<ToDeclT> OC;
215
8.63k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
8.63k
                                            std::forward<Args>(args)...);
217
8.63k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ObjCTypeParamDecl, clang::ObjCTypeParamDecl, clang::ASTContext&, clang::DeclContext*&, clang::ObjCTypeParamVariance, clang::SourceLocation&, unsigned int, clang::SourceLocation&, clang::IdentifierInfo*, clang::SourceLocation&, clang::TypeSourceInfo*&>(clang::ObjCTypeParamDecl*&, clang::ObjCTypeParamDecl*, clang::ASTContext&, clang::DeclContext*&, clang::ObjCTypeParamVariance&&, clang::SourceLocation&, unsigned int&&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::SourceLocation&, clang::TypeSourceInfo*&)
Line
Count
Source
210
390
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
390
      CallOverloadedCreateFun<ToDeclT> OC;
215
390
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
390
                                            std::forward<Args>(args)...);
217
390
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ObjCCategoryDecl, clang::ObjCCategoryDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::ObjCInterfaceDecl*&, std::nullptr_t, clang::SourceLocation&, clang::SourceLocation&>(clang::ObjCCategoryDecl*&, clang::ObjCCategoryDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::ObjCInterfaceDecl*&, std::nullptr_t&&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
210
2.44k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
2.44k
      CallOverloadedCreateFun<ToDeclT> OC;
215
2.44k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
2.44k
                                            std::forward<Args>(args)...);
217
2.44k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ObjCProtocolDecl, clang::ObjCProtocolDecl, clang::ASTContext&, clang::DeclContext*&, clang::IdentifierInfo*, clang::SourceLocation&, clang::SourceLocation&, std::nullptr_t>(clang::ObjCProtocolDecl*&, clang::ObjCProtocolDecl*, clang::ASTContext&, clang::DeclContext*&, clang::IdentifierInfo*&&, clang::SourceLocation&, clang::SourceLocation&, std::nullptr_t&&)
Line
Count
Source
210
375
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
375
      CallOverloadedCreateFun<ToDeclT> OC;
215
375
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
375
                                            std::forward<Args>(args)...);
217
375
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::LinkageSpecDecl, clang::LinkageSpecDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::LinkageSpecDecl::LanguageIDs, bool&>(clang::LinkageSpecDecl*&, clang::LinkageSpecDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::LinkageSpecDecl::LanguageIDs&&, bool&)
Line
Count
Source
210
4.74k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
4.74k
      CallOverloadedCreateFun<ToDeclT> OC;
215
4.74k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
4.74k
                                            std::forward<Args>(args)...);
217
4.74k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::UsingDecl, clang::UsingDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::DeclarationNameInfo&, bool>(clang::UsingDecl*&, clang::UsingDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::DeclarationNameInfo&, bool&&)
Line
Count
Source
210
2.91k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
2.91k
      CallOverloadedCreateFun<ToDeclT> OC;
215
2.91k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
2.91k
                                            std::forward<Args>(args)...);
217
2.91k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::UsingEnumDecl, clang::UsingEnumDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::EnumDecl*&>(clang::UsingEnumDecl*&, clang::UsingEnumDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::EnumDecl*&)
Line
Count
Source
210
8
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
8
      CallOverloadedCreateFun<ToDeclT> OC;
215
8
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
8
                                            std::forward<Args>(args)...);
217
8
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::UsingShadowDecl, clang::UsingShadowDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::BaseUsingDecl*&, clang::NamedDecl*&>(clang::UsingShadowDecl*&, clang::UsingShadowDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::BaseUsingDecl*&, clang::NamedDecl*&)
Line
Count
Source
210
13.8k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
13.8k
      CallOverloadedCreateFun<ToDeclT> OC;
215
13.8k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
13.8k
                                            std::forward<Args>(args)...);
217
13.8k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::UsingDirectiveDecl, clang::UsingDirectiveDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::NamespaceDecl*&, clang::DeclContext*&>(clang::UsingDirectiveDecl*&, clang::UsingDirectiveDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::NamespaceDecl*&, clang::DeclContext*&)
Line
Count
Source
210
125
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
125
      CallOverloadedCreateFun<ToDeclT> OC;
215
125
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
125
                                            std::forward<Args>(args)...);
217
125
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::UnresolvedUsingValueDecl, clang::UnresolvedUsingValueDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::DeclarationNameInfo&, clang::SourceLocation&>(clang::UnresolvedUsingValueDecl*&, clang::UnresolvedUsingValueDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::DeclarationNameInfo&, clang::SourceLocation&)
Line
Count
Source
210
2
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
2
      CallOverloadedCreateFun<ToDeclT> OC;
215
2
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
2
                                            std::forward<Args>(args)...);
217
2
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::UnresolvedUsingTypenameDecl, clang::UnresolvedUsingTypenameDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::DeclarationName&, clang::SourceLocation&>(clang::UnresolvedUsingTypenameDecl*&, clang::UnresolvedUsingTypenameDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::DeclarationName&, clang::SourceLocation&)
Line
Count
Source
210
208
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
208
      CallOverloadedCreateFun<ToDeclT> OC;
215
208
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
208
                                            std::forward<Args>(args)...);
217
208
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ObjCInterfaceDecl, clang::ObjCInterfaceDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, std::nullptr_t, std::nullptr_t, clang::SourceLocation&, bool>(clang::ObjCInterfaceDecl*&, clang::ObjCInterfaceDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, std::nullptr_t&&, std::nullptr_t&&, clang::SourceLocation&, bool&&)
Line
Count
Source
210
2.32k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
2.32k
      CallOverloadedCreateFun<ToDeclT> OC;
215
2.32k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
2.32k
                                            std::forward<Args>(args)...);
217
2.32k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ObjCCategoryImplDecl, clang::ObjCCategoryImplDecl, clang::ASTContext&, clang::DeclContext*&, clang::IdentifierInfo*, clang::ObjCInterfaceDecl*, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&>(clang::ObjCCategoryImplDecl*&, clang::ObjCCategoryImplDecl*, clang::ASTContext&, clang::DeclContext*&, clang::IdentifierInfo*&&, clang::ObjCInterfaceDecl*&&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
210
4
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
4
      CallOverloadedCreateFun<ToDeclT> OC;
215
4
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
4
                                            std::forward<Args>(args)...);
217
4
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ObjCImplementationDecl, clang::ObjCImplementationDecl, clang::ASTContext&, clang::DeclContext*&, clang::ObjCInterfaceDecl*&, clang::ObjCInterfaceDecl*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&>(clang::ObjCImplementationDecl*&, clang::ObjCImplementationDecl*, clang::ASTContext&, clang::DeclContext*&, clang::ObjCInterfaceDecl*&, clang::ObjCInterfaceDecl*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
210
8
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
8
      CallOverloadedCreateFun<ToDeclT> OC;
215
8
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
8
                                            std::forward<Args>(args)...);
217
8
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ObjCPropertyDecl, clang::ObjCPropertyDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, clang::SourceLocation&, clang::SourceLocation&, clang::QualType&, clang::TypeSourceInfo*&, clang::ObjCPropertyDecl::PropertyControl>(clang::ObjCPropertyDecl*&, clang::ObjCPropertyDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::SourceLocation&, clang::SourceLocation&, clang::QualType&, clang::TypeSourceInfo*&, clang::ObjCPropertyDecl::PropertyControl&&)
Line
Count
Source
210
2.31k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
2.31k
      CallOverloadedCreateFun<ToDeclT> OC;
215
2.31k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
2.31k
                                            std::forward<Args>(args)...);
217
2.31k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ObjCPropertyImplDecl, clang::ObjCPropertyImplDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::ObjCPropertyDecl*&, clang::ObjCPropertyImplDecl::Kind, clang::ObjCIvarDecl*&, clang::SourceLocation&>(clang::ObjCPropertyImplDecl*&, clang::ObjCPropertyImplDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::ObjCPropertyDecl*&, clang::ObjCPropertyImplDecl::Kind&&, clang::ObjCIvarDecl*&, clang::SourceLocation&)
Line
Count
Source
210
4
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
4
      CallOverloadedCreateFun<ToDeclT> OC;
215
4
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
4
                                            std::forward<Args>(args)...);
217
4
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::TemplateTypeParmDecl, clang::TemplateTypeParmDecl, clang::ASTContext&, clang::TranslationUnitDecl*, clang::SourceLocation&, clang::SourceLocation&, unsigned int, unsigned int, clang::IdentifierInfo*, bool, bool, bool>(clang::TemplateTypeParmDecl*&, clang::TemplateTypeParmDecl*, clang::ASTContext&, clang::TranslationUnitDecl*&&, clang::SourceLocation&, clang::SourceLocation&, unsigned int&&, unsigned int&&, clang::IdentifierInfo*&&, bool&&, bool&&, bool&&)
Line
Count
Source
210
325k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
325k
      CallOverloadedCreateFun<ToDeclT> OC;
215
325k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
325k
                                            std::forward<Args>(args)...);
217
325k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::NonTypeTemplateParmDecl, clang::NonTypeTemplateParmDecl, clang::ASTContext&, clang::TranslationUnitDecl*, clang::SourceLocation&, clang::SourceLocation&, unsigned int, unsigned int, clang::IdentifierInfo*, clang::QualType&, bool, clang::TypeSourceInfo*&>(clang::NonTypeTemplateParmDecl*&, clang::NonTypeTemplateParmDecl*, clang::ASTContext&, clang::TranslationUnitDecl*&&, clang::SourceLocation&, clang::SourceLocation&, unsigned int&&, unsigned int&&, clang::IdentifierInfo*&&, clang::QualType&, bool&&, clang::TypeSourceInfo*&)
Line
Count
Source
210
46.0k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
46.0k
      CallOverloadedCreateFun<ToDeclT> OC;
215
46.0k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
46.0k
                                            std::forward<Args>(args)...);
217
46.0k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::TemplateTemplateParmDecl, clang::TemplateTemplateParmDecl, clang::ASTContext&, clang::TranslationUnitDecl*, clang::SourceLocation&, unsigned int, unsigned int, bool, clang::IdentifierInfo*, clang::TemplateParameterList*&>(clang::TemplateTemplateParmDecl*&, clang::TemplateTemplateParmDecl*, clang::ASTContext&, clang::TranslationUnitDecl*&&, clang::SourceLocation&, unsigned int&&, unsigned int&&, bool&&, clang::IdentifierInfo*&&, clang::TemplateParameterList*&)
Line
Count
Source
210
1.69k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
1.69k
      CallOverloadedCreateFun<ToDeclT> OC;
215
1.69k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
1.69k
                                            std::forward<Args>(args)...);
217
1.69k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ClassTemplateDecl, clang::ClassTemplateDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::CXXRecordDecl*&>(clang::ClassTemplateDecl*&, clang::ClassTemplateDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::CXXRecordDecl*&)
Line
Count
Source
210
106k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
106k
      CallOverloadedCreateFun<ToDeclT> OC;
215
106k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
106k
                                            std::forward<Args>(args)...);
217
106k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ClassTemplateSpecializationDecl, clang::ClassTemplateSpecializationDecl, clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::ClassTemplateDecl*&, llvm::SmallVector<clang::TemplateArgument, 2u>&, clang::ClassTemplateSpecializationDecl*&>(clang::ClassTemplateSpecializationDecl*&, clang::ClassTemplateSpecializationDecl*, clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::ClassTemplateDecl*&, llvm::SmallVector<clang::TemplateArgument, 2u>&, clang::ClassTemplateSpecializationDecl*&)
Line
Count
Source
210
62.1k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
62.1k
      CallOverloadedCreateFun<ToDeclT> OC;
215
62.1k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
62.1k
                                            std::forward<Args>(args)...);
217
62.1k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::VarTemplateDecl, clang::VarTemplateDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::VarDecl*&>(clang::VarTemplateDecl*&, clang::VarTemplateDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::VarDecl*&)
Line
Count
Source
210
414
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
414
      CallOverloadedCreateFun<ToDeclT> OC;
215
414
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
414
                                            std::forward<Args>(args)...);
217
414
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::VarTemplatePartialSpecializationDecl, clang::VarTemplateSpecializationDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::TemplateParameterList*&, clang::VarTemplateDecl*&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, llvm::SmallVector<clang::TemplateArgument, 2u>&, clang::TemplateArgumentListInfo&>(clang::VarTemplatePartialSpecializationDecl*&, clang::VarTemplateSpecializationDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::TemplateParameterList*&, clang::VarTemplateDecl*&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, llvm::SmallVector<clang::TemplateArgument, 2u>&, clang::TemplateArgumentListInfo&)
Line
Count
Source
210
10
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
10
      CallOverloadedCreateFun<ToDeclT> OC;
215
10
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
10
                                            std::forward<Args>(args)...);
217
10
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::VarTemplateSpecializationDecl, clang::VarTemplateSpecializationDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::VarTemplateDecl*&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, llvm::SmallVector<clang::TemplateArgument, 2u>&>(clang::VarTemplateSpecializationDecl*&, clang::VarTemplateSpecializationDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::VarTemplateDecl*&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, llvm::SmallVector<clang::TemplateArgument, 2u>&)
Line
Count
Source
210
6
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
6
      CallOverloadedCreateFun<ToDeclT> OC;
215
6
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
6
                                            std::forward<Args>(args)...);
217
6
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::FunctionTemplateDecl, clang::FunctionTemplateDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::FunctionDecl*&>(clang::FunctionTemplateDecl*&, clang::FunctionTemplateDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::FunctionDecl*&)
Line
Count
Source
210
152k
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
152k
      CallOverloadedCreateFun<ToDeclT> OC;
215
152k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
152k
                                            std::forward<Args>(args)...);
217
152k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::LifetimeExtendedTemporaryDecl, clang::LifetimeExtendedTemporaryDecl, clang::Expr*&, clang::ValueDecl*&, unsigned int>(clang::LifetimeExtendedTemporaryDecl*&, clang::LifetimeExtendedTemporaryDecl*, clang::Expr*&, clang::ValueDecl*&, unsigned int&&)
Line
Count
Source
210
2
                                                Args &&... args) {
211
      // There may be several overloads of ToDeclT::Create. We must make sure
212
      // to call the one which would be chosen by the arguments, thus we use a
213
      // wrapper for the overload set.
214
2
      CallOverloadedCreateFun<ToDeclT> OC;
215
2
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
216
2
                                            std::forward<Args>(args)...);
217
2
    }
218
    // Use this overload if a special Type is needed to be created.  E.g if we
219
    // want to create a `TypeAliasDecl` and assign that to a `TypedefNameDecl`
220
    // then:
221
    // TypedefNameDecl *ToTypedef;
222
    // GetImportedOrCreateDecl<TypeAliasDecl>(ToTypedef, FromD, ...);
223
    template <typename NewDeclT, typename ToDeclT, typename FromDeclT,
224
              typename... Args>
225
    LLVM_NODISCARD bool GetImportedOrCreateDecl(ToDeclT *&ToD, FromDeclT *FromD,
226
768k
                                                Args &&... args) {
227
768k
      CallOverloadedCreateFun<NewDeclT> OC;
228
768k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
229
768k
                                            std::forward<Args>(args)...);
230
768k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::TypeAliasDecl, clang::TypedefNameDecl, clang::TypedefNameDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::TypeSourceInfo*&>(clang::TypedefNameDecl*&, clang::TypedefNameDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::TypeSourceInfo*&)
Line
Count
Source
226
11.9k
                                                Args &&... args) {
227
11.9k
      CallOverloadedCreateFun<NewDeclT> OC;
228
11.9k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
229
11.9k
                                            std::forward<Args>(args)...);
230
11.9k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::TypedefDecl, clang::TypedefNameDecl, clang::TypedefNameDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::TypeSourceInfo*&>(clang::TypedefNameDecl*&, clang::TypedefNameDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::TypeSourceInfo*&)
Line
Count
Source
226
171k
                                                Args &&... args) {
227
171k
      CallOverloadedCreateFun<NewDeclT> OC;
228
171k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
229
171k
                                            std::forward<Args>(args)...);
230
171k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::CXXConstructorDecl, clang::FunctionDecl, clang::FunctionDecl, clang::ASTContext&, clang::CXXRecordDecl*, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::ExplicitSpecifier&, bool, bool, bool, clang::ConstexprSpecKind, clang::InheritedConstructor&, clang::Expr*&>(clang::FunctionDecl*&, clang::FunctionDecl*, clang::ASTContext&, clang::CXXRecordDecl*&&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::ExplicitSpecifier&, bool&&, bool&&, bool&&, clang::ConstexprSpecKind&&, clang::InheritedConstructor&, clang::Expr*&)
Line
Count
Source
226
115k
                                                Args &&... args) {
227
115k
      CallOverloadedCreateFun<NewDeclT> OC;
228
115k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
229
115k
                                            std::forward<Args>(args)...);
230
115k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::CXXDestructorDecl, clang::FunctionDecl, clang::FunctionDecl, clang::ASTContext&, clang::CXXRecordDecl*, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, bool, bool, bool, clang::ConstexprSpecKind, clang::Expr*&>(clang::FunctionDecl*&, clang::FunctionDecl*, clang::ASTContext&, clang::CXXRecordDecl*&&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, bool&&, bool&&, bool&&, clang::ConstexprSpecKind&&, clang::Expr*&)
Line
Count
Source
226
12.5k
                                                Args &&... args) {
227
12.5k
      CallOverloadedCreateFun<NewDeclT> OC;
228
12.5k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
229
12.5k
                                            std::forward<Args>(args)...);
230
12.5k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::CXXConversionDecl, clang::FunctionDecl, clang::FunctionDecl, clang::ASTContext&, clang::CXXRecordDecl*, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, bool, bool, clang::ExplicitSpecifier&, clang::ConstexprSpecKind, clang::SourceLocation, clang::Expr*&>(clang::FunctionDecl*&, clang::FunctionDecl*, clang::ASTContext&, clang::CXXRecordDecl*&&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, bool&&, bool&&, clang::ExplicitSpecifier&, clang::ConstexprSpecKind&&, clang::SourceLocation&&, clang::Expr*&)
Line
Count
Source
226
2.59k
                                                Args &&... args) {
227
2.59k
      CallOverloadedCreateFun<NewDeclT> OC;
228
2.59k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
229
2.59k
                                            std::forward<Args>(args)...);
230
2.59k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::CXXMethodDecl, clang::FunctionDecl, clang::FunctionDecl, clang::ASTContext&, clang::CXXRecordDecl*, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, bool, bool, clang::ConstexprSpecKind, clang::SourceLocation, clang::Expr*&>(clang::FunctionDecl*&, clang::FunctionDecl*, clang::ASTContext&, clang::CXXRecordDecl*&&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, bool&&, bool&&, clang::ConstexprSpecKind&&, clang::SourceLocation&&, clang::Expr*&)
Line
Count
Source
226
452k
                                                Args &&... args) {
227
452k
      CallOverloadedCreateFun<NewDeclT> OC;
228
452k
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
229
452k
                                            std::forward<Args>(args)...);
230
452k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::CXXDeductionGuideDecl, clang::FunctionDecl, clang::FunctionDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::ExplicitSpecifier&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::SourceLocation&, clang::CXXConstructorDecl*&>(clang::FunctionDecl*&, clang::FunctionDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::ExplicitSpecifier&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::SourceLocation&, clang::CXXConstructorDecl*&)
Line
Count
Source
226
48
                                                Args &&... args) {
227
48
      CallOverloadedCreateFun<NewDeclT> OC;
228
48
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
229
48
                                            std::forward<Args>(args)...);
230
48
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ConstructorUsingShadowDecl, clang::UsingShadowDecl, clang::UsingShadowDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::UsingDecl*, clang::NamedDecl*, bool>(clang::UsingShadowDecl*&, clang::UsingShadowDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::UsingDecl*&&, clang::NamedDecl*&&, bool&&)
Line
Count
Source
226
165
                                                Args &&... args) {
227
165
      CallOverloadedCreateFun<NewDeclT> OC;
228
165
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
229
165
                                            std::forward<Args>(args)...);
230
165
    }
bool clang::ASTNodeImporter::GetImportedOrCreateDecl<clang::ClassTemplatePartialSpecializationDecl, clang::ClassTemplateSpecializationDecl, clang::ClassTemplateSpecializationDecl, clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::TemplateParameterList*&, clang::ClassTemplateDecl*&, llvm::ArrayRef<clang::TemplateArgument>, clang::TemplateArgumentListInfo&, clang::QualType&, clang::ClassTemplatePartialSpecializationDecl*>(clang::ClassTemplateSpecializationDecl*&, clang::ClassTemplateSpecializationDecl*, clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::TemplateParameterList*&, clang::ClassTemplateDecl*&, llvm::ArrayRef<clang::TemplateArgument>&&, clang::TemplateArgumentListInfo&, clang::QualType&, clang::ClassTemplatePartialSpecializationDecl*&&)
Line
Count
Source
226
859
                                                Args &&... args) {
227
859
      CallOverloadedCreateFun<NewDeclT> OC;
228
859
      return GetImportedOrCreateSpecialDecl(ToD, OC, FromD,
229
859
                                            std::forward<Args>(args)...);
230
859
    }
231
    // Use this version if a special create function must be
232
    // used, e.g. CXXRecordDecl::CreateLambda .
233
    template <typename ToDeclT, typename CreateFunT, typename FromDeclT,
234
              typename... Args>
235
    LLVM_NODISCARD bool
236
    GetImportedOrCreateSpecialDecl(ToDeclT *&ToD, CreateFunT CreateFun,
237
2.63M
                                   FromDeclT *FromD, Args &&... args) {
238
2.63M
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
4
        ToD = nullptr;
240
4
        return true; // Already imported but with error.
241
4
      }
242
2.63M
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
2.63M
      if (ToD)
244
129k
        return true; // Already imported.
245
2.50M
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
2.50M
      Importer.RegisterImportedDecl(FromD, ToD);
248
2.50M
      InitializeImportedDecl(FromD, ToD);
249
2.50M
      return false; // A new Decl is created.
250
2.63M
    }
Unexecuted instantiation: bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::EmptyDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::EmptyDecl>, clang::EmptyDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&>(clang::EmptyDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::EmptyDecl>, clang::EmptyDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&)
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::BindingDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::BindingDecl>, clang::BindingDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*>(clang::BindingDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::BindingDecl>, clang::BindingDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&)
Line
Count
Source
237
32
                                   FromDeclT *FromD, Args &&... args) {
238
32
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
32
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
32
      if (ToD)
244
0
        return true; // Already imported.
245
32
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
32
      Importer.RegisterImportedDecl(FromD, ToD);
248
32
      InitializeImportedDecl(FromD, ToD);
249
32
      return false; // A new Decl is created.
250
32
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::AccessSpecDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::AccessSpecDecl>, clang::AccessSpecDecl, clang::ASTContext&, clang::AccessSpecifier, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&>(clang::AccessSpecDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::AccessSpecDecl>, clang::AccessSpecDecl*, clang::ASTContext&, clang::AccessSpecifier&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
237
52.3k
                                   FromDeclT *FromD, Args &&... args) {
238
52.3k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
52.3k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
52.3k
      if (ToD)
244
0
        return true; // Already imported.
245
52.3k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
52.3k
      Importer.RegisterImportedDecl(FromD, ToD);
248
52.3k
      InitializeImportedDecl(FromD, ToD);
249
52.3k
      return false; // A new Decl is created.
250
52.3k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::StaticAssertDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::StaticAssertDecl>, clang::StaticAssertDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::Expr*&, clang::StringLiteral*&, clang::SourceLocation&, bool>(clang::StaticAssertDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::StaticAssertDecl>, clang::StaticAssertDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::Expr*&, clang::StringLiteral*&, clang::SourceLocation&, bool&&)
Line
Count
Source
237
7.97k
                                   FromDeclT *FromD, Args &&... args) {
238
7.97k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
7.97k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
7.97k
      if (ToD)
244
0
        return true; // Already imported.
245
7.97k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
7.97k
      Importer.RegisterImportedDecl(FromD, ToD);
248
7.97k
      InitializeImportedDecl(FromD, ToD);
249
7.97k
      return false; // A new Decl is created.
250
7.97k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::NamespaceDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::NamespaceDecl>, clang::NamespaceDecl, clang::ASTContext&, clang::DeclContext*&, bool, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, std::nullptr_t>(clang::NamespaceDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::NamespaceDecl>, clang::NamespaceDecl*, clang::ASTContext&, clang::DeclContext*&, bool&&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, std::nullptr_t&&)
Line
Count
Source
237
4.00k
                                   FromDeclT *FromD, Args &&... args) {
238
4.00k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
4.00k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
4.00k
      if (ToD)
244
0
        return true; // Already imported.
245
4.00k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
4.00k
      Importer.RegisterImportedDecl(FromD, ToD);
248
4.00k
      InitializeImportedDecl(FromD, ToD);
249
4.00k
      return false; // A new Decl is created.
250
4.00k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::NamespaceAliasDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::NamespaceAliasDecl>, clang::NamespaceAliasDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::NamespaceDecl*&>(clang::NamespaceAliasDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::NamespaceAliasDecl>, clang::NamespaceAliasDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::NamespaceDecl*&)
Line
Count
Source
237
3
                                   FromDeclT *FromD, Args &&... args) {
238
3
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
3
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
3
      if (ToD)
244
0
        return true; // Already imported.
245
3
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
3
      Importer.RegisterImportedDecl(FromD, ToD);
248
3
      InitializeImportedDecl(FromD, ToD);
249
3
      return false; // A new Decl is created.
250
3
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::TypedefNameDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TypeAliasDecl>, clang::TypedefNameDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::TypeSourceInfo*&>(clang::TypedefNameDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TypeAliasDecl>, clang::TypedefNameDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::TypeSourceInfo*&)
Line
Count
Source
237
11.9k
                                   FromDeclT *FromD, Args &&... args) {
238
11.9k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
11.9k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
11.9k
      if (ToD)
244
642
        return true; // Already imported.
245
11.2k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
11.2k
      Importer.RegisterImportedDecl(FromD, ToD);
248
11.2k
      InitializeImportedDecl(FromD, ToD);
249
11.2k
      return false; // A new Decl is created.
250
11.9k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::TypedefNameDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TypedefDecl>, clang::TypedefNameDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::TypeSourceInfo*&>(clang::TypedefNameDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TypedefDecl>, clang::TypedefNameDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::TypeSourceInfo*&)
Line
Count
Source
237
171k
                                   FromDeclT *FromD, Args &&... args) {
238
171k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
171k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
171k
      if (ToD)
244
1.19k
        return true; // Already imported.
245
170k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
170k
      Importer.RegisterImportedDecl(FromD, ToD);
248
170k
      InitializeImportedDecl(FromD, ToD);
249
170k
      return false; // A new Decl is created.
250
171k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::TypeAliasTemplateDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TypeAliasTemplateDecl>, clang::TypeAliasTemplateDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::TypeAliasDecl*&>(clang::TypeAliasTemplateDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TypeAliasTemplateDecl>, clang::TypeAliasTemplateDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::TypeAliasDecl*&)
Line
Count
Source
237
5.40k
                                   FromDeclT *FromD, Args &&... args) {
238
5.40k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
5.40k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
5.40k
      if (ToD)
244
117
        return true; // Already imported.
245
5.28k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
5.28k
      Importer.RegisterImportedDecl(FromD, ToD);
248
5.28k
      InitializeImportedDecl(FromD, ToD);
249
5.28k
      return false; // A new Decl is created.
250
5.40k
    }
Unexecuted instantiation: bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::LabelDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::LabelDecl>, clang::LabelDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, clang::SourceLocation&>(clang::LabelDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::LabelDecl>, clang::LabelDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::SourceLocation&)
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::LabelDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::LabelDecl>, clang::LabelDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*>(clang::LabelDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::LabelDecl>, clang::LabelDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&)
Line
Count
Source
237
15
                                   FromDeclT *FromD, Args &&... args) {
238
15
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
15
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
15
      if (ToD)
244
0
        return true; // Already imported.
245
15
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
15
      Importer.RegisterImportedDecl(FromD, ToD);
248
15
      InitializeImportedDecl(FromD, ToD);
249
15
      return false; // A new Decl is created.
250
15
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::EnumDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::EnumDecl>, clang::EnumDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::EnumDecl*&, bool, bool, bool>(clang::EnumDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::EnumDecl>, clang::EnumDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::EnumDecl*&, bool&&, bool&&, bool&&)
Line
Count
Source
237
1.53k
                                   FromDeclT *FromD, Args &&... args) {
238
1.53k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
1.53k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
1.53k
      if (ToD)
244
0
        return true; // Already imported.
245
1.53k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
1.53k
      Importer.RegisterImportedDecl(FromD, ToD);
248
1.53k
      InitializeImportedDecl(FromD, ToD);
249
1.53k
      return false; // A new Decl is created.
250
1.53k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::CXXRecordDecl, clang::CXXRecordDecl* (*)(clang::ASTContext const&, clang::DeclContext*, clang::TypeSourceInfo*, clang::SourceLocation, bool, bool, clang::LambdaCaptureDefault), clang::RecordDecl, clang::ASTContext&, clang::DeclContext*&, clang::TypeSourceInfo*&, clang::SourceLocation&, bool, bool, clang::LambdaCaptureDefault>(clang::CXXRecordDecl*&, clang::CXXRecordDecl* (*)(clang::ASTContext const&, clang::DeclContext*, clang::TypeSourceInfo*, clang::SourceLocation, bool, bool, clang::LambdaCaptureDefault), clang::RecordDecl*, clang::ASTContext&, clang::DeclContext*&, clang::TypeSourceInfo*&, clang::SourceLocation&, bool&&, bool&&, clang::LambdaCaptureDefault&&)
Line
Count
Source
237
89
                                   FromDeclT *FromD, Args &&... args) {
238
89
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
89
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
89
      if (ToD)
244
0
        return true; // Already imported.
245
89
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
89
      Importer.RegisterImportedDecl(FromD, ToD);
248
89
      InitializeImportedDecl(FromD, ToD);
249
89
      return false; // A new Decl is created.
250
89
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::CXXRecordDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXRecordDecl>, clang::RecordDecl, clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::CXXRecordDecl*, bool const&>(clang::CXXRecordDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXRecordDecl>, clang::RecordDecl*, clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::CXXRecordDecl*&&, bool const&)
Line
Count
Source
237
52.0k
                                   FromDeclT *FromD, Args &&... args) {
238
52.0k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
52.0k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
52.0k
      if (ToD)
244
0
        return true; // Already imported.
245
52.0k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
52.0k
      Importer.RegisterImportedDecl(FromD, ToD);
248
52.0k
      InitializeImportedDecl(FromD, ToD);
249
52.0k
      return false; // A new Decl is created.
250
52.0k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::CXXRecordDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXRecordDecl>, clang::RecordDecl, clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::CXXRecordDecl*>(clang::CXXRecordDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXRecordDecl>, clang::RecordDecl*, clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::CXXRecordDecl*&&)
Line
Count
Source
237
74.5k
                                   FromDeclT *FromD, Args &&... args) {
238
74.5k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
4
        ToD = nullptr;
240
4
        return true; // Already imported but with error.
241
4
      }
242
74.5k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
74.5k
      if (ToD)
244
698
        return true; // Already imported.
245
73.8k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
73.8k
      Importer.RegisterImportedDecl(FromD, ToD);
248
73.8k
      InitializeImportedDecl(FromD, ToD);
249
73.8k
      return false; // A new Decl is created.
250
74.5k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::RecordDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::RecordDecl>, clang::RecordDecl, clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::RecordDecl*&>(clang::RecordDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::RecordDecl>, clang::RecordDecl*, clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::RecordDecl*&)
Line
Count
Source
237
146
                                   FromDeclT *FromD, Args &&... args) {
238
146
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
146
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
146
      if (ToD)
244
13
        return true; // Already imported.
245
133
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
133
      Importer.RegisterImportedDecl(FromD, ToD);
248
133
      InitializeImportedDecl(FromD, ToD);
249
133
      return false; // A new Decl is created.
250
146
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::EnumConstantDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::EnumConstantDecl>, clang::EnumConstantDecl, clang::ASTContext&, clang::EnumDecl*, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::Expr*&, llvm::APSInt const&>(clang::EnumConstantDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::EnumConstantDecl>, clang::EnumConstantDecl*, clang::ASTContext&, clang::EnumDecl*&&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::Expr*&, llvm::APSInt const&)
Line
Count
Source
237
3.69k
                                   FromDeclT *FromD, Args &&... args) {
238
3.69k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
3.69k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
3.69k
      if (ToD)
244
0
        return true; // Already imported.
245
3.69k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
3.69k
      Importer.RegisterImportedDecl(FromD, ToD);
248
3.69k
      InitializeImportedDecl(FromD, ToD);
249
3.69k
      return false; // A new Decl is created.
250
3.69k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::FunctionDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXConstructorDecl>, clang::FunctionDecl, clang::ASTContext&, clang::CXXRecordDecl*, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::ExplicitSpecifier&, bool, bool, bool, clang::ConstexprSpecKind, clang::InheritedConstructor&, clang::Expr*&>(clang::FunctionDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXConstructorDecl>, clang::FunctionDecl*, clang::ASTContext&, clang::CXXRecordDecl*&&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::ExplicitSpecifier&, bool&&, bool&&, bool&&, clang::ConstexprSpecKind&&, clang::InheritedConstructor&, clang::Expr*&)
Line
Count
Source
237
115k
                                   FromDeclT *FromD, Args &&... args) {
238
115k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
115k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
115k
      if (ToD)
244
18
        return true; // Already imported.
245
115k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
115k
      Importer.RegisterImportedDecl(FromD, ToD);
248
115k
      InitializeImportedDecl(FromD, ToD);
249
115k
      return false; // A new Decl is created.
250
115k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::FunctionDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXDestructorDecl>, clang::FunctionDecl, clang::ASTContext&, clang::CXXRecordDecl*, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, bool, bool, bool, clang::ConstexprSpecKind, clang::Expr*&>(clang::FunctionDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXDestructorDecl>, clang::FunctionDecl*, clang::ASTContext&, clang::CXXRecordDecl*&&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, bool&&, bool&&, bool&&, clang::ConstexprSpecKind&&, clang::Expr*&)
Line
Count
Source
237
12.5k
                                   FromDeclT *FromD, Args &&... args) {
238
12.5k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
12.5k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
12.5k
      if (ToD)
244
0
        return true; // Already imported.
245
12.5k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
12.5k
      Importer.RegisterImportedDecl(FromD, ToD);
248
12.5k
      InitializeImportedDecl(FromD, ToD);
249
12.5k
      return false; // A new Decl is created.
250
12.5k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::FunctionDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXConversionDecl>, clang::FunctionDecl, clang::ASTContext&, clang::CXXRecordDecl*, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, bool, bool, clang::ExplicitSpecifier&, clang::ConstexprSpecKind, clang::SourceLocation, clang::Expr*&>(clang::FunctionDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXConversionDecl>, clang::FunctionDecl*, clang::ASTContext&, clang::CXXRecordDecl*&&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, bool&&, bool&&, clang::ExplicitSpecifier&, clang::ConstexprSpecKind&&, clang::SourceLocation&&, clang::Expr*&)
Line
Count
Source
237
2.59k
                                   FromDeclT *FromD, Args &&... args) {
238
2.59k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
2.59k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
2.59k
      if (ToD)
244
0
        return true; // Already imported.
245
2.59k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
2.59k
      Importer.RegisterImportedDecl(FromD, ToD);
248
2.59k
      InitializeImportedDecl(FromD, ToD);
249
2.59k
      return false; // A new Decl is created.
250
2.59k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::FunctionDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXMethodDecl>, clang::FunctionDecl, clang::ASTContext&, clang::CXXRecordDecl*, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, bool, bool, clang::ConstexprSpecKind, clang::SourceLocation, clang::Expr*&>(clang::FunctionDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXMethodDecl>, clang::FunctionDecl*, clang::ASTContext&, clang::CXXRecordDecl*&&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, bool&&, bool&&, clang::ConstexprSpecKind&&, clang::SourceLocation&&, clang::Expr*&)
Line
Count
Source
237
452k
                                   FromDeclT *FromD, Args &&... args) {
238
452k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
452k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
452k
      if (ToD)
244
414
        return true; // Already imported.
245
452k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
452k
      Importer.RegisterImportedDecl(FromD, ToD);
248
452k
      InitializeImportedDecl(FromD, ToD);
249
452k
      return false; // A new Decl is created.
250
452k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::FunctionDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXDeductionGuideDecl>, clang::FunctionDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::ExplicitSpecifier&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::SourceLocation&, clang::CXXConstructorDecl*&>(clang::FunctionDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::CXXDeductionGuideDecl>, clang::FunctionDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::ExplicitSpecifier&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::SourceLocation&, clang::CXXConstructorDecl*&)
Line
Count
Source
237
48
                                   FromDeclT *FromD, Args &&... args) {
238
48
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
48
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
48
      if (ToD)
244
4
        return true; // Already imported.
245
44
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
44
      Importer.RegisterImportedDecl(FromD, ToD);
248
44
      InitializeImportedDecl(FromD, ToD);
249
44
      return false; // A new Decl is created.
250
48
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::FunctionDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::FunctionDecl>, clang::FunctionDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, bool, bool, bool, clang::ConstexprSpecKind, clang::Expr*&>(clang::FunctionDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::FunctionDecl>, clang::FunctionDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationNameInfo&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, bool&&, bool&&, bool&&, clang::ConstexprSpecKind&&, clang::Expr*&)
Line
Count
Source
237
57.9k
                                   FromDeclT *FromD, Args &&... args) {
238
57.9k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
57.9k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
57.9k
      if (ToD)
244
14
        return true; // Already imported.
245
57.9k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
57.9k
      Importer.RegisterImportedDecl(FromD, ToD);
248
57.9k
      InitializeImportedDecl(FromD, ToD);
249
57.9k
      return false; // A new Decl is created.
250
57.9k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::FieldDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::FieldDecl>, clang::FieldDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::TypeSourceInfo*&, clang::Expr*&, bool, clang::InClassInitStyle>(clang::FieldDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::FieldDecl>, clang::FieldDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::TypeSourceInfo*&, clang::Expr*&, bool&&, clang::InClassInitStyle&&)
Line
Count
Source
237
50.8k
                                   FromDeclT *FromD, Args &&... args) {
238
50.8k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
50.8k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
50.8k
      if (ToD)
244
216
        return true; // Already imported.
245
50.6k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
50.6k
      Importer.RegisterImportedDecl(FromD, ToD);
248
50.6k
      InitializeImportedDecl(FromD, ToD);
249
50.6k
      return false; // A new Decl is created.
250
50.8k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::IndirectFieldDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::IndirectFieldDecl>, clang::IndirectFieldDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, llvm::MutableArrayRef<clang::NamedDecl*>&>(clang::IndirectFieldDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::IndirectFieldDecl>, clang::IndirectFieldDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, llvm::MutableArrayRef<clang::NamedDecl*>&)
Line
Count
Source
237
966
                                   FromDeclT *FromD, Args &&... args) {
238
966
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
966
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
966
      if (ToD)
244
0
        return true; // Already imported.
245
966
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
966
      Importer.RegisterImportedDecl(FromD, ToD);
248
966
      InitializeImportedDecl(FromD, ToD);
249
966
      return false; // A new Decl is created.
250
966
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::FriendDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::FriendDecl>, clang::FriendDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, llvm::PointerUnion<clang::NamedDecl*, clang::TypeSourceInfo*>&, clang::SourceLocation&, llvm::SmallVector<clang::TemplateParameterList*, 1u>&>(clang::FriendDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::FriendDecl>, clang::FriendDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, llvm::PointerUnion<clang::NamedDecl*, clang::TypeSourceInfo*>&, clang::SourceLocation&, llvm::SmallVector<clang::TemplateParameterList*, 1u>&)
Line
Count
Source
237
13.9k
                                   FromDeclT *FromD, Args &&... args) {
238
13.9k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
13.9k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
13.9k
      if (ToD)
244
0
        return true; // Already imported.
245
13.9k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
13.9k
      Importer.RegisterImportedDecl(FromD, ToD);
248
13.9k
      InitializeImportedDecl(FromD, ToD);
249
13.9k
      return false; // A new Decl is created.
250
13.9k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ObjCIvarDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCIvarDecl>, clang::ObjCIvarDecl, clang::ASTContext&, clang::ObjCContainerDecl*, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::TypeSourceInfo*&, clang::ObjCIvarDecl::AccessControl, clang::Expr*&, bool>(clang::ObjCIvarDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCIvarDecl>, clang::ObjCIvarDecl*, clang::ASTContext&, clang::ObjCContainerDecl*&&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::TypeSourceInfo*&, clang::ObjCIvarDecl::AccessControl&&, clang::Expr*&, bool&&)
Line
Count
Source
237
1.63k
                                   FromDeclT *FromD, Args &&... args) {
238
1.63k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
1.63k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
1.63k
      if (ToD)
244
0
        return true; // Already imported.
245
1.63k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
1.63k
      Importer.RegisterImportedDecl(FromD, ToD);
248
1.63k
      InitializeImportedDecl(FromD, ToD);
249
1.63k
      return false; // A new Decl is created.
250
1.63k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::DecompositionDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::DecompositionDecl>, clang::DecompositionDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, llvm::SmallVector<clang::BindingDecl*, 6u>&>(clang::DecompositionDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::DecompositionDecl>, clang::DecompositionDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, llvm::SmallVector<clang::BindingDecl*, 6u>&)
Line
Count
Source
237
48
                                   FromDeclT *FromD, Args &&... args) {
238
48
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
48
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
48
      if (ToD)
244
32
        return true; // Already imported.
245
16
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
16
      Importer.RegisterImportedDecl(FromD, ToD);
248
16
      InitializeImportedDecl(FromD, ToD);
249
16
      return false; // A new Decl is created.
250
48
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::VarDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::VarDecl>, clang::VarDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass>(clang::VarDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::VarDecl>, clang::VarDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&)
Line
Count
Source
237
130k
                                   FromDeclT *FromD, Args &&... args) {
238
130k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
130k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
130k
      if (ToD)
244
0
        return true; // Already imported.
245
130k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
130k
      Importer.RegisterImportedDecl(FromD, ToD);
248
130k
      InitializeImportedDecl(FromD, ToD);
249
130k
      return false; // A new Decl is created.
250
130k
    }
Unexecuted instantiation: bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ImplicitParamDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ImplicitParamDecl>, clang::ImplicitParamDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::ImplicitParamDecl::ImplicitParamKind>(clang::ImplicitParamDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ImplicitParamDecl>, clang::ImplicitParamDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::ImplicitParamDecl::ImplicitParamKind&&)
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ParmVarDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ParmVarDecl>, clang::ParmVarDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, std::nullptr_t>(clang::ParmVarDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ParmVarDecl>, clang::ParmVarDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, std::nullptr_t&&)
Line
Count
Source
237
678k
                                   FromDeclT *FromD, Args &&... args) {
238
678k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
678k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
678k
      if (ToD)
244
0
        return true; // Already imported.
245
678k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
678k
      Importer.RegisterImportedDecl(FromD, ToD);
248
678k
      InitializeImportedDecl(FromD, ToD);
249
678k
      return false; // A new Decl is created.
250
678k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ObjCMethodDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCMethodDecl>, clang::ObjCMethodDecl, clang::ASTContext&, clang::SourceLocation&, clang::SourceLocation&, clang::Selector, clang::QualType&, clang::TypeSourceInfo*&, clang::DeclContext*&, bool, bool, bool, bool, bool, bool, clang::ObjCMethodDecl::ImplementationControl, bool>(clang::ObjCMethodDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCMethodDecl>, clang::ObjCMethodDecl*, clang::ASTContext&, clang::SourceLocation&, clang::SourceLocation&, clang::Selector&&, clang::QualType&, clang::TypeSourceInfo*&, clang::DeclContext*&, bool&&, bool&&, bool&&, bool&&, bool&&, bool&&, clang::ObjCMethodDecl::ImplementationControl&&, bool&&)
Line
Count
Source
237
8.63k
                                   FromDeclT *FromD, Args &&... args) {
238
8.63k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
8.63k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
8.63k
      if (ToD)
244
0
        return true; // Already imported.
245
8.63k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
8.63k
      Importer.RegisterImportedDecl(FromD, ToD);
248
8.63k
      InitializeImportedDecl(FromD, ToD);
249
8.63k
      return false; // A new Decl is created.
250
8.63k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ObjCTypeParamDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCTypeParamDecl>, clang::ObjCTypeParamDecl, clang::ASTContext&, clang::DeclContext*&, clang::ObjCTypeParamVariance, clang::SourceLocation&, unsigned int, clang::SourceLocation&, clang::IdentifierInfo*, clang::SourceLocation&, clang::TypeSourceInfo*&>(clang::ObjCTypeParamDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCTypeParamDecl>, clang::ObjCTypeParamDecl*, clang::ASTContext&, clang::DeclContext*&, clang::ObjCTypeParamVariance&&, clang::SourceLocation&, unsigned int&&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::SourceLocation&, clang::TypeSourceInfo*&)
Line
Count
Source
237
390
                                   FromDeclT *FromD, Args &&... args) {
238
390
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
390
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
390
      if (ToD)
244
0
        return true; // Already imported.
245
390
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
390
      Importer.RegisterImportedDecl(FromD, ToD);
248
390
      InitializeImportedDecl(FromD, ToD);
249
390
      return false; // A new Decl is created.
250
390
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ObjCCategoryDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCCategoryDecl>, clang::ObjCCategoryDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*, clang::ObjCInterfaceDecl*&, std::nullptr_t, clang::SourceLocation&, clang::SourceLocation&>(clang::ObjCCategoryDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCCategoryDecl>, clang::ObjCCategoryDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::ObjCInterfaceDecl*&, std::nullptr_t&&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
237
2.44k
                                   FromDeclT *FromD, Args &&... args) {
238
2.44k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
2.44k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
2.44k
      if (ToD)
244
0
        return true; // Already imported.
245
2.44k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
2.44k
      Importer.RegisterImportedDecl(FromD, ToD);
248
2.44k
      InitializeImportedDecl(FromD, ToD);
249
2.44k
      return false; // A new Decl is created.
250
2.44k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ObjCProtocolDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCProtocolDecl>, clang::ObjCProtocolDecl, clang::ASTContext&, clang::DeclContext*&, clang::IdentifierInfo*, clang::SourceLocation&, clang::SourceLocation&, std::nullptr_t>(clang::ObjCProtocolDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCProtocolDecl>, clang::ObjCProtocolDecl*, clang::ASTContext&, clang::DeclContext*&, clang::IdentifierInfo*&&, clang::SourceLocation&, clang::SourceLocation&, std::nullptr_t&&)
Line
Count
Source
237
375
                                   FromDeclT *FromD, Args &&... args) {
238
375
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
375
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
375
      if (ToD)
244
0
        return true; // Already imported.
245
375
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
375
      Importer.RegisterImportedDecl(FromD, ToD);
248
375
      InitializeImportedDecl(FromD, ToD);
249
375
      return false; // A new Decl is created.
250
375
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::LinkageSpecDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::LinkageSpecDecl>, clang::LinkageSpecDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::LinkageSpecDecl::LanguageIDs, bool&>(clang::LinkageSpecDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::LinkageSpecDecl>, clang::LinkageSpecDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::LinkageSpecDecl::LanguageIDs&&, bool&)
Line
Count
Source
237
4.74k
                                   FromDeclT *FromD, Args &&... args) {
238
4.74k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
4.74k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
4.74k
      if (ToD)
244
0
        return true; // Already imported.
245
4.74k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
4.74k
      Importer.RegisterImportedDecl(FromD, ToD);
248
4.74k
      InitializeImportedDecl(FromD, ToD);
249
4.74k
      return false; // A new Decl is created.
250
4.74k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::UsingDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UsingDecl>, clang::UsingDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::DeclarationNameInfo&, bool>(clang::UsingDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UsingDecl>, clang::UsingDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::DeclarationNameInfo&, bool&&)
Line
Count
Source
237
2.91k
                                   FromDeclT *FromD, Args &&... args) {
238
2.91k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
2.91k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
2.91k
      if (ToD)
244
0
        return true; // Already imported.
245
2.91k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
2.91k
      Importer.RegisterImportedDecl(FromD, ToD);
248
2.91k
      InitializeImportedDecl(FromD, ToD);
249
2.91k
      return false; // A new Decl is created.
250
2.91k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::UsingEnumDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UsingEnumDecl>, clang::UsingEnumDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::EnumDecl*&>(clang::UsingEnumDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UsingEnumDecl>, clang::UsingEnumDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::EnumDecl*&)
Line
Count
Source
237
8
                                   FromDeclT *FromD, Args &&... args) {
238
8
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
8
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
8
      if (ToD)
244
0
        return true; // Already imported.
245
8
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
8
      Importer.RegisterImportedDecl(FromD, ToD);
248
8
      InitializeImportedDecl(FromD, ToD);
249
8
      return false; // A new Decl is created.
250
8
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::UsingShadowDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ConstructorUsingShadowDecl>, clang::UsingShadowDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::UsingDecl*, clang::NamedDecl*, bool>(clang::UsingShadowDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ConstructorUsingShadowDecl>, clang::UsingShadowDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::UsingDecl*&&, clang::NamedDecl*&&, bool&&)
Line
Count
Source
237
165
                                   FromDeclT *FromD, Args &&... args) {
238
165
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
165
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
165
      if (ToD)
244
0
        return true; // Already imported.
245
165
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
165
      Importer.RegisterImportedDecl(FromD, ToD);
248
165
      InitializeImportedDecl(FromD, ToD);
249
165
      return false; // A new Decl is created.
250
165
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::UsingShadowDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UsingShadowDecl>, clang::UsingShadowDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::BaseUsingDecl*&, clang::NamedDecl*&>(clang::UsingShadowDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UsingShadowDecl>, clang::UsingShadowDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::BaseUsingDecl*&, clang::NamedDecl*&)
Line
Count
Source
237
13.8k
                                   FromDeclT *FromD, Args &&... args) {
238
13.8k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
13.8k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
13.8k
      if (ToD)
244
2.33k
        return true; // Already imported.
245
11.4k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
11.4k
      Importer.RegisterImportedDecl(FromD, ToD);
248
11.4k
      InitializeImportedDecl(FromD, ToD);
249
11.4k
      return false; // A new Decl is created.
250
13.8k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::UsingDirectiveDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UsingDirectiveDecl>, clang::UsingDirectiveDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::NamespaceDecl*&, clang::DeclContext*&>(clang::UsingDirectiveDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UsingDirectiveDecl>, clang::UsingDirectiveDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::NamespaceDecl*&, clang::DeclContext*&)
Line
Count
Source
237
125
                                   FromDeclT *FromD, Args &&... args) {
238
125
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
125
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
125
      if (ToD)
244
0
        return true; // Already imported.
245
125
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
125
      Importer.RegisterImportedDecl(FromD, ToD);
248
125
      InitializeImportedDecl(FromD, ToD);
249
125
      return false; // A new Decl is created.
250
125
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::UnresolvedUsingValueDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UnresolvedUsingValueDecl>, clang::UnresolvedUsingValueDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::DeclarationNameInfo&, clang::SourceLocation&>(clang::UnresolvedUsingValueDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UnresolvedUsingValueDecl>, clang::UnresolvedUsingValueDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::DeclarationNameInfo&, clang::SourceLocation&)
Line
Count
Source
237
2
                                   FromDeclT *FromD, Args &&... args) {
238
2
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
2
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
2
      if (ToD)
244
0
        return true; // Already imported.
245
2
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
2
      Importer.RegisterImportedDecl(FromD, ToD);
248
2
      InitializeImportedDecl(FromD, ToD);
249
2
      return false; // A new Decl is created.
250
2
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::UnresolvedUsingTypenameDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UnresolvedUsingTypenameDecl>, clang::UnresolvedUsingTypenameDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::DeclarationName&, clang::SourceLocation&>(clang::UnresolvedUsingTypenameDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::UnresolvedUsingTypenameDecl>, clang::UnresolvedUsingTypenameDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::NestedNameSpecifierLoc&, clang::SourceLocation&, clang::DeclarationName&, clang::SourceLocation&)
Line
Count
Source
237
208
                                   FromDeclT *FromD, Args &&... args) {
238
208
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
208
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
208
      if (ToD)
244
12
        return true; // Already imported.
245
196
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
196
      Importer.RegisterImportedDecl(FromD, ToD);
248
196
      InitializeImportedDecl(FromD, ToD);
249
196
      return false; // A new Decl is created.
250
208
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ObjCInterfaceDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCInterfaceDecl>, clang::ObjCInterfaceDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, std::nullptr_t, std::nullptr_t, clang::SourceLocation&, bool>(clang::ObjCInterfaceDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCInterfaceDecl>, clang::ObjCInterfaceDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, std::nullptr_t&&, std::nullptr_t&&, clang::SourceLocation&, bool&&)
Line
Count
Source
237
2.32k
                                   FromDeclT *FromD, Args &&... args) {
238
2.32k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
2.32k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
2.32k
      if (ToD)
244
0
        return true; // Already imported.
245
2.32k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
2.32k
      Importer.RegisterImportedDecl(FromD, ToD);
248
2.32k
      InitializeImportedDecl(FromD, ToD);
249
2.32k
      return false; // A new Decl is created.
250
2.32k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ObjCCategoryImplDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCCategoryImplDecl>, clang::ObjCCategoryImplDecl, clang::ASTContext&, clang::DeclContext*&, clang::IdentifierInfo*, clang::ObjCInterfaceDecl*, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&>(clang::ObjCCategoryImplDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCCategoryImplDecl>, clang::ObjCCategoryImplDecl*, clang::ASTContext&, clang::DeclContext*&, clang::IdentifierInfo*&&, clang::ObjCInterfaceDecl*&&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
237
4
                                   FromDeclT *FromD, Args &&... args) {
238
4
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
4
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
4
      if (ToD)
244
0
        return true; // Already imported.
245
4
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
4
      Importer.RegisterImportedDecl(FromD, ToD);
248
4
      InitializeImportedDecl(FromD, ToD);
249
4
      return false; // A new Decl is created.
250
4
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ObjCImplementationDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCImplementationDecl>, clang::ObjCImplementationDecl, clang::ASTContext&, clang::DeclContext*&, clang::ObjCInterfaceDecl*&, clang::ObjCInterfaceDecl*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&>(clang::ObjCImplementationDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCImplementationDecl>, clang::ObjCImplementationDecl*, clang::ASTContext&, clang::DeclContext*&, clang::ObjCInterfaceDecl*&, clang::ObjCInterfaceDecl*&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
237
8
                                   FromDeclT *FromD, Args &&... args) {
238
8
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
8
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
8
      if (ToD)
244
0
        return true; // Already imported.
245
8
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
8
      Importer.RegisterImportedDecl(FromD, ToD);
248
8
      InitializeImportedDecl(FromD, ToD);
249
8
      return false; // A new Decl is created.
250
8
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ObjCPropertyDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCPropertyDecl>, clang::ObjCPropertyDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*, clang::SourceLocation&, clang::SourceLocation&, clang::QualType&, clang::TypeSourceInfo*&, clang::ObjCPropertyDecl::PropertyControl>(clang::ObjCPropertyDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCPropertyDecl>, clang::ObjCPropertyDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::IdentifierInfo*&&, clang::SourceLocation&, clang::SourceLocation&, clang::QualType&, clang::TypeSourceInfo*&, clang::ObjCPropertyDecl::PropertyControl&&)
Line
Count
Source
237
2.31k
                                   FromDeclT *FromD, Args &&... args) {
238
2.31k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
2.31k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
2.31k
      if (ToD)
244
0
        return true; // Already imported.
245
2.31k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
2.31k
      Importer.RegisterImportedDecl(FromD, ToD);
248
2.31k
      InitializeImportedDecl(FromD, ToD);
249
2.31k
      return false; // A new Decl is created.
250
2.31k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ObjCPropertyImplDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCPropertyImplDecl>, clang::ObjCPropertyImplDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::ObjCPropertyDecl*&, clang::ObjCPropertyImplDecl::Kind, clang::ObjCIvarDecl*&, clang::SourceLocation&>(clang::ObjCPropertyImplDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ObjCPropertyImplDecl>, clang::ObjCPropertyImplDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::ObjCPropertyDecl*&, clang::ObjCPropertyImplDecl::Kind&&, clang::ObjCIvarDecl*&, clang::SourceLocation&)
Line
Count
Source
237
4
                                   FromDeclT *FromD, Args &&... args) {
238
4
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
4
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
4
      if (ToD)
244
0
        return true; // Already imported.
245
4
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
4
      Importer.RegisterImportedDecl(FromD, ToD);
248
4
      InitializeImportedDecl(FromD, ToD);
249
4
      return false; // A new Decl is created.
250
4
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::TemplateTypeParmDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TemplateTypeParmDecl>, clang::TemplateTypeParmDecl, clang::ASTContext&, clang::TranslationUnitDecl*, clang::SourceLocation&, clang::SourceLocation&, unsigned int, unsigned int, clang::IdentifierInfo*, bool, bool, bool>(clang::TemplateTypeParmDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TemplateTypeParmDecl>, clang::TemplateTypeParmDecl*, clang::ASTContext&, clang::TranslationUnitDecl*&&, clang::SourceLocation&, clang::SourceLocation&, unsigned int&&, unsigned int&&, clang::IdentifierInfo*&&, bool&&, bool&&, bool&&)
Line
Count
Source
237
325k
                                   FromDeclT *FromD, Args &&... args) {
238
325k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
325k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
325k
      if (ToD)
244
0
        return true; // Already imported.
245
325k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
325k
      Importer.RegisterImportedDecl(FromD, ToD);
248
325k
      InitializeImportedDecl(FromD, ToD);
249
325k
      return false; // A new Decl is created.
250
325k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::NonTypeTemplateParmDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::NonTypeTemplateParmDecl>, clang::NonTypeTemplateParmDecl, clang::ASTContext&, clang::TranslationUnitDecl*, clang::SourceLocation&, clang::SourceLocation&, unsigned int, unsigned int, clang::IdentifierInfo*, clang::QualType&, bool, clang::TypeSourceInfo*&>(clang::NonTypeTemplateParmDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::NonTypeTemplateParmDecl>, clang::NonTypeTemplateParmDecl*, clang::ASTContext&, clang::TranslationUnitDecl*&&, clang::SourceLocation&, clang::SourceLocation&, unsigned int&&, unsigned int&&, clang::IdentifierInfo*&&, clang::QualType&, bool&&, clang::TypeSourceInfo*&)
Line
Count
Source
237
46.0k
                                   FromDeclT *FromD, Args &&... args) {
238
46.0k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
46.0k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
46.0k
      if (ToD)
244
0
        return true; // Already imported.
245
46.0k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
46.0k
      Importer.RegisterImportedDecl(FromD, ToD);
248
46.0k
      InitializeImportedDecl(FromD, ToD);
249
46.0k
      return false; // A new Decl is created.
250
46.0k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::TemplateTemplateParmDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TemplateTemplateParmDecl>, clang::TemplateTemplateParmDecl, clang::ASTContext&, clang::TranslationUnitDecl*, clang::SourceLocation&, unsigned int, unsigned int, bool, clang::IdentifierInfo*, clang::TemplateParameterList*&>(clang::TemplateTemplateParmDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::TemplateTemplateParmDecl>, clang::TemplateTemplateParmDecl*, clang::ASTContext&, clang::TranslationUnitDecl*&&, clang::SourceLocation&, unsigned int&&, unsigned int&&, bool&&, clang::IdentifierInfo*&&, clang::TemplateParameterList*&)
Line
Count
Source
237
1.69k
                                   FromDeclT *FromD, Args &&... args) {
238
1.69k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
1.69k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
1.69k
      if (ToD)
244
0
        return true; // Already imported.
245
1.69k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
1.69k
      Importer.RegisterImportedDecl(FromD, ToD);
248
1.69k
      InitializeImportedDecl(FromD, ToD);
249
1.69k
      return false; // A new Decl is created.
250
1.69k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ClassTemplateDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ClassTemplateDecl>, clang::ClassTemplateDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::CXXRecordDecl*&>(clang::ClassTemplateDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ClassTemplateDecl>, clang::ClassTemplateDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::CXXRecordDecl*&)
Line
Count
Source
237
106k
                                   FromDeclT *FromD, Args &&... args) {
238
106k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
106k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
106k
      if (ToD)
244
53.4k
        return true; // Already imported.
245
53.5k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
53.5k
      Importer.RegisterImportedDecl(FromD, ToD);
248
53.5k
      InitializeImportedDecl(FromD, ToD);
249
53.5k
      return false; // A new Decl is created.
250
106k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ClassTemplateSpecializationDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ClassTemplatePartialSpecializationDecl>, clang::ClassTemplateSpecializationDecl, clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::TemplateParameterList*&, clang::ClassTemplateDecl*&, llvm::ArrayRef<clang::TemplateArgument>, clang::TemplateArgumentListInfo&, clang::QualType&, clang::ClassTemplatePartialSpecializationDecl*>(clang::ClassTemplateSpecializationDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ClassTemplatePartialSpecializationDecl>, clang::ClassTemplateSpecializationDecl*, clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::TemplateParameterList*&, clang::ClassTemplateDecl*&, llvm::ArrayRef<clang::TemplateArgument>&&, clang::TemplateArgumentListInfo&, clang::QualType&, clang::ClassTemplatePartialSpecializationDecl*&&)
Line
Count
Source
237
859
                                   FromDeclT *FromD, Args &&... args) {
238
859
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
859
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
859
      if (ToD)
244
0
        return true; // Already imported.
245
859
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
859
      Importer.RegisterImportedDecl(FromD, ToD);
248
859
      InitializeImportedDecl(FromD, ToD);
249
859
      return false; // A new Decl is created.
250
859
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::ClassTemplateSpecializationDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ClassTemplateSpecializationDecl>, clang::ClassTemplateSpecializationDecl, clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::ClassTemplateDecl*&, llvm::SmallVector<clang::TemplateArgument, 2u>&, clang::ClassTemplateSpecializationDecl*&>(clang::ClassTemplateSpecializationDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::ClassTemplateSpecializationDecl>, clang::ClassTemplateSpecializationDecl*, clang::ASTContext&, clang::TagTypeKind&&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::ClassTemplateDecl*&, llvm::SmallVector<clang::TemplateArgument, 2u>&, clang::ClassTemplateSpecializationDecl*&)
Line
Count
Source
237
62.1k
                                   FromDeclT *FromD, Args &&... args) {
238
62.1k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
62.1k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
62.1k
      if (ToD)
244
9
        return true; // Already imported.
245
62.1k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
62.1k
      Importer.RegisterImportedDecl(FromD, ToD);
248
62.1k
      InitializeImportedDecl(FromD, ToD);
249
62.1k
      return false; // A new Decl is created.
250
62.1k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::VarTemplateDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::VarTemplateDecl>, clang::VarTemplateDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::VarDecl*&>(clang::VarTemplateDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::VarTemplateDecl>, clang::VarTemplateDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::VarDecl*&)
Line
Count
Source
237
414
                                   FromDeclT *FromD, Args &&... args) {
238
414
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
414
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
414
      if (ToD)
244
195
        return true; // Already imported.
245
219
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
219
      Importer.RegisterImportedDecl(FromD, ToD);
248
219
      InitializeImportedDecl(FromD, ToD);
249
219
      return false; // A new Decl is created.
250
414
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::VarTemplatePartialSpecializationDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::VarTemplatePartialSpecializationDecl>, clang::VarTemplateSpecializationDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::TemplateParameterList*&, clang::VarTemplateDecl*&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, llvm::SmallVector<clang::TemplateArgument, 2u>&, clang::TemplateArgumentListInfo&>(clang::VarTemplatePartialSpecializationDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::VarTemplatePartialSpecializationDecl>, clang::VarTemplateSpecializationDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::TemplateParameterList*&, clang::VarTemplateDecl*&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, llvm::SmallVector<clang::TemplateArgument, 2u>&, clang::TemplateArgumentListInfo&)
Line
Count
Source
237
10
                                   FromDeclT *FromD, Args &&... args) {
238
10
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
10
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
10
      if (ToD)
244
0
        return true; // Already imported.
245
10
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
10
      Importer.RegisterImportedDecl(FromD, ToD);
248
10
      InitializeImportedDecl(FromD, ToD);
249
10
      return false; // A new Decl is created.
250
10
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::VarTemplateSpecializationDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::VarTemplateSpecializationDecl>, clang::VarTemplateSpecializationDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::VarTemplateDecl*&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass, llvm::SmallVector<clang::TemplateArgument, 2u>&>(clang::VarTemplateSpecializationDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::VarTemplateSpecializationDecl>, clang::VarTemplateSpecializationDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::SourceLocation&, clang::VarTemplateDecl*&, clang::QualType&, clang::TypeSourceInfo*&, clang::StorageClass&&, llvm::SmallVector<clang::TemplateArgument, 2u>&)
Line
Count
Source
237
6
                                   FromDeclT *FromD, Args &&... args) {
238
6
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
6
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
6
      if (ToD)
244
0
        return true; // Already imported.
245
6
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
6
      Importer.RegisterImportedDecl(FromD, ToD);
248
6
      InitializeImportedDecl(FromD, ToD);
249
6
      return false; // A new Decl is created.
250
6
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::FunctionTemplateDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::FunctionTemplateDecl>, clang::FunctionTemplateDecl, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::FunctionDecl*&>(clang::FunctionTemplateDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::FunctionTemplateDecl>, clang::FunctionTemplateDecl*, clang::ASTContext&, clang::DeclContext*&, clang::SourceLocation&, clang::DeclarationName&, clang::TemplateParameterList*&, clang::FunctionDecl*&)
Line
Count
Source
237
152k
                                   FromDeclT *FromD, Args &&... args) {
238
152k
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
152k
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
152k
      if (ToD)
244
69.6k
        return true; // Already imported.
245
82.4k
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
82.4k
      Importer.RegisterImportedDecl(FromD, ToD);
248
82.4k
      InitializeImportedDecl(FromD, ToD);
249
82.4k
      return false; // A new Decl is created.
250
152k
    }
bool clang::ASTNodeImporter::GetImportedOrCreateSpecialDecl<clang::LifetimeExtendedTemporaryDecl, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::LifetimeExtendedTemporaryDecl>, clang::LifetimeExtendedTemporaryDecl, clang::Expr*&, clang::ValueDecl*&, unsigned int>(clang::LifetimeExtendedTemporaryDecl*&, clang::ASTNodeImporter::CallOverloadedCreateFun<clang::LifetimeExtendedTemporaryDecl>, clang::LifetimeExtendedTemporaryDecl*, clang::Expr*&, clang::ValueDecl*&, unsigned int&&)
Line
Count
Source
237
2
                                   FromDeclT *FromD, Args &&... args) {
238
2
      if (Importer.getImportDeclErrorIfAny(FromD)) {
239
0
        ToD = nullptr;
240
0
        return true; // Already imported but with error.
241
0
      }
242
2
      ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
243
2
      if (ToD)
244
0
        return true; // Already imported.
245
2
      ToD = CreateFun(std::forward<Args>(args)...);
246
      // Keep track of imported Decls.
247
2
      Importer.RegisterImportedDecl(FromD, ToD);
248
2
      InitializeImportedDecl(FromD, ToD);
249
2
      return false; // A new Decl is created.
250
2
    }
251
252
2.50M
    void InitializeImportedDecl(Decl *FromD, Decl *ToD) {
253
2.50M
      ToD->IdentifierNamespace = FromD->IdentifierNamespace;
254
2.50M
      if (FromD->isUsed())
255
52.2k
        ToD->setIsUsed();
256
2.50M
      if (FromD->isImplicit())
257
96.6k
        ToD->setImplicit();
258
2.50M
    }
259
260
    // Check if we have found an existing definition.  Returns with that
261
    // definition if yes, otherwise returns null.
262
67.2k
    Decl *FindAndMapDefinition(FunctionDecl *D, FunctionDecl *FoundFunction) {
263
67.2k
      const FunctionDecl *Definition = nullptr;
264
67.2k
      if (D->doesThisDeclarationHaveABody() &&
265
67.2k
          
FoundFunction->hasBody(Definition)36.4k
)
266
3.79k
        return Importer.MapImported(D, const_cast<FunctionDecl *>(Definition));
267
63.4k
      return nullptr;
268
67.2k
    }
269
270
952k
    void addDeclToContexts(Decl *FromD, Decl *ToD) {
271
952k
      if (Importer.isMinimalImport()) {
272
        // In minimal import case the decl must be added even if it is not
273
        // contained in original context, for LLDB compatibility.
274
        // FIXME: Check if a better solution is possible.
275
945k
        if (!FromD->getDescribedTemplate() &&
276
945k
            
FromD->getFriendObjectKind() == Decl::FOK_None790k
)
277
784k
          ToD->getLexicalDeclContext()->addDeclInternal(ToD);
278
945k
        return;
279
945k
      }
280
281
7.21k
      DeclContext *FromDC = FromD->getDeclContext();
282
7.21k
      DeclContext *FromLexicalDC = FromD->getLexicalDeclContext();
283
7.21k
      DeclContext *ToDC = ToD->getDeclContext();
284
7.21k
      DeclContext *ToLexicalDC = ToD->getLexicalDeclContext();
285
286
7.21k
      bool Visible = false;
287
7.21k
      if (FromDC->containsDeclAndLoad(FromD)) {
288
5.61k
        ToDC->addDeclInternal(ToD);
289
5.61k
        Visible = true;
290
5.61k
      }
291
7.21k
      if (ToDC != ToLexicalDC && 
FromLexicalDC->containsDeclAndLoad(FromD)211
) {
292
94
        ToLexicalDC->addDeclInternal(ToD);
293
94
        Visible = true;
294
94
      }
295
296
      // If the Decl was added to any context, it was made already visible.
297
      // Otherwise it is still possible that it should be visible.
298
7.21k
      if (!Visible) {
299
1.50k
        if (auto *FromNamed = dyn_cast<NamedDecl>(FromD)) {
300
1.50k
          auto *ToNamed = cast<NamedDecl>(ToD);
301
1.50k
          DeclContextLookupResult FromLookup =
302
1.50k
              FromDC->lookup(FromNamed->getDeclName());
303
1.50k
          if (llvm::is_contained(FromLookup, FromNamed))
304
29
            ToDC->makeDeclVisibleInContext(ToNamed);
305
1.50k
        }
306
1.50k
      }
307
7.21k
    }
308
309
    void updateLookupTableForTemplateParameters(TemplateParameterList &Params,
310
59.6k
                                                DeclContext *OldDC) {
311
59.6k
      ASTImporterLookupTable *LT = Importer.SharedState->getLookupTable();
312
59.6k
      if (!LT)
313
59.1k
        return;
314
315
535
      for (NamedDecl *TP : Params)
316
561
        LT->update(TP, OldDC);
317
535
    }
318
319
59.6k
    void updateLookupTableForTemplateParameters(TemplateParameterList &Params) {
320
59.6k
      updateLookupTableForTemplateParameters(
321
59.6k
          Params, Importer.getToContext().getTranslationUnitDecl());
322
59.6k
    }
323
324
  public:
325
9.81M
    explicit ASTNodeImporter(ASTImporter &Importer) : Importer(Importer) {}
326
327
    using TypeVisitor<ASTNodeImporter, ExpectedType>::Visit;
328
    using DeclVisitor<ASTNodeImporter, ExpectedDecl>::Visit;
329
    using StmtVisitor<ASTNodeImporter, ExpectedStmt>::Visit;
330
331
    // Importing types
332
    ExpectedType VisitType(const Type *T);
333
    ExpectedType VisitAtomicType(const AtomicType *T);
334
    ExpectedType VisitBuiltinType(const BuiltinType *T);
335
    ExpectedType VisitDecayedType(const DecayedType *T);
336
    ExpectedType VisitComplexType(const ComplexType *T);
337
    ExpectedType VisitPointerType(const PointerType *T);
338
    ExpectedType VisitBlockPointerType(const BlockPointerType *T);
339
    ExpectedType VisitLValueReferenceType(const LValueReferenceType *T);
340
    ExpectedType VisitRValueReferenceType(const RValueReferenceType *T);
341
    ExpectedType VisitMemberPointerType(const MemberPointerType *T);
342
    ExpectedType VisitConstantArrayType(const ConstantArrayType *T);
343
    ExpectedType VisitIncompleteArrayType(const IncompleteArrayType *T);
344
    ExpectedType VisitVariableArrayType(const VariableArrayType *T);
345
    ExpectedType VisitDependentSizedArrayType(const DependentSizedArrayType *T);
346
    // FIXME: DependentSizedExtVectorType
347
    ExpectedType VisitVectorType(const VectorType *T);
348
    ExpectedType VisitExtVectorType(const ExtVectorType *T);
349
    ExpectedType VisitFunctionNoProtoType(const FunctionNoProtoType *T);
350
    ExpectedType VisitFunctionProtoType(const FunctionProtoType *T);
351
    ExpectedType VisitUnresolvedUsingType(const UnresolvedUsingType *T);
352
    ExpectedType VisitParenType(const ParenType *T);
353
    ExpectedType VisitTypedefType(const TypedefType *T);
354
    ExpectedType VisitTypeOfExprType(const TypeOfExprType *T);
355
    // FIXME: DependentTypeOfExprType
356
    ExpectedType VisitTypeOfType(const TypeOfType *T);
357
    ExpectedType VisitUsingType(const UsingType *T);
358
    ExpectedType VisitDecltypeType(const DecltypeType *T);
359
    ExpectedType VisitUnaryTransformType(const UnaryTransformType *T);
360
    ExpectedType VisitAutoType(const AutoType *T);
361
    ExpectedType VisitDeducedTemplateSpecializationType(
362
        const DeducedTemplateSpecializationType *T);
363
    ExpectedType VisitInjectedClassNameType(const InjectedClassNameType *T);
364
    // FIXME: DependentDecltypeType
365
    ExpectedType VisitRecordType(const RecordType *T);
366
    ExpectedType VisitEnumType(const EnumType *T);
367
    ExpectedType VisitAttributedType(const AttributedType *T);
368
    ExpectedType VisitTemplateTypeParmType(const TemplateTypeParmType *T);
369
    ExpectedType VisitSubstTemplateTypeParmType(
370
        const SubstTemplateTypeParmType *T);
371
    ExpectedType
372
    VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T);
373
    ExpectedType VisitTemplateSpecializationType(
374
        const TemplateSpecializationType *T);
375
    ExpectedType VisitElaboratedType(const ElaboratedType *T);
376
    ExpectedType VisitDependentNameType(const DependentNameType *T);
377
    ExpectedType VisitPackExpansionType(const PackExpansionType *T);
378
    ExpectedType VisitDependentTemplateSpecializationType(
379
        const DependentTemplateSpecializationType *T);
380
    ExpectedType VisitObjCInterfaceType(const ObjCInterfaceType *T);
381
    ExpectedType VisitObjCObjectType(const ObjCObjectType *T);
382
    ExpectedType VisitObjCObjectPointerType(const ObjCObjectPointerType *T);
383
384
    // Importing declarations
385
    Error ImportDeclParts(NamedDecl *D, DeclarationName &Name, NamedDecl *&ToD,
386
                          SourceLocation &Loc);
387
    Error ImportDeclParts(
388
        NamedDecl *D, DeclContext *&DC, DeclContext *&LexicalDC,
389
        DeclarationName &Name, NamedDecl *&ToD, SourceLocation &Loc);
390
    Error ImportDefinitionIfNeeded(Decl *FromD, Decl *ToD = nullptr);
391
    Error ImportDeclarationNameLoc(
392
        const DeclarationNameInfo &From, DeclarationNameInfo &To);
393
    Error ImportDeclContext(DeclContext *FromDC, bool ForceImport = false);
394
    Error ImportDeclContext(
395
        Decl *From, DeclContext *&ToDC, DeclContext *&ToLexicalDC);
396
    Error ImportImplicitMethods(const CXXRecordDecl *From, CXXRecordDecl *To);
397
398
    Expected<CXXCastPath> ImportCastPath(CastExpr *E);
399
    Expected<APValue> ImportAPValue(const APValue &FromValue);
400
401
    using Designator = DesignatedInitExpr::Designator;
402
403
    /// What we should import from the definition.
404
    enum ImportDefinitionKind {
405
      /// Import the default subset of the definition, which might be
406
      /// nothing (if minimal import is set) or might be everything (if minimal
407
      /// import is not set).
408
      IDK_Default,
409
      /// Import everything.
410
      IDK_Everything,
411
      /// Import only the bare bones needed to establish a valid
412
      /// DeclContext.
413
      IDK_Basic
414
    };
415
416
88.1k
    bool shouldForceImportDeclContext(ImportDefinitionKind IDK) {
417
88.1k
      return IDK == IDK_Everything ||
418
88.1k
             
(87.9k
IDK == IDK_Default87.9k
&&
!Importer.isMinimalImport()86.5k
);
419
88.1k
    }
420
421
    Error ImportInitializer(VarDecl *From, VarDecl *To);
422
    Error ImportDefinition(
423
        RecordDecl *From, RecordDecl *To,
424
        ImportDefinitionKind Kind = IDK_Default);
425
    Error ImportDefinition(
426
        EnumDecl *From, EnumDecl *To,
427
        ImportDefinitionKind Kind = IDK_Default);
428
    Error ImportDefinition(
429
        ObjCInterfaceDecl *From, ObjCInterfaceDecl *To,
430
        ImportDefinitionKind Kind = IDK_Default);
431
    Error ImportDefinition(
432
        ObjCProtocolDecl *From, ObjCProtocolDecl *To,
433
        ImportDefinitionKind Kind = IDK_Default);
434
    Error ImportTemplateArguments(
435
        const TemplateArgument *FromArgs, unsigned NumFromArgs,
436
        SmallVectorImpl<TemplateArgument> &ToArgs);
437
    Expected<TemplateArgument>
438
    ImportTemplateArgument(const TemplateArgument &From);
439
440
    template <typename InContainerTy>
441
    Error ImportTemplateArgumentListInfo(
442
        const InContainerTy &Container, TemplateArgumentListInfo &ToTAInfo);
443
444
    template<typename InContainerTy>
445
    Error ImportTemplateArgumentListInfo(
446
      SourceLocation FromLAngleLoc, SourceLocation FromRAngleLoc,
447
      const InContainerTy &Container, TemplateArgumentListInfo &Result);
448
449
    using TemplateArgsTy = SmallVector<TemplateArgument, 8>;
450
    using FunctionTemplateAndArgsTy =
451
        std::tuple<FunctionTemplateDecl *, TemplateArgsTy>;
452
    Expected<FunctionTemplateAndArgsTy>
453
    ImportFunctionTemplateWithTemplateArgsFromSpecialization(
454
        FunctionDecl *FromFD);
455
    Error ImportTemplateParameterLists(const DeclaratorDecl *FromD,
456
                                       DeclaratorDecl *ToD);
457
458
    Error ImportTemplateInformation(FunctionDecl *FromFD, FunctionDecl *ToFD);
459
460
    Error ImportFunctionDeclBody(FunctionDecl *FromFD, FunctionDecl *ToFD);
461
462
    Error ImportDefaultArgOfParmVarDecl(const ParmVarDecl *FromParam,
463
                                        ParmVarDecl *ToParam);
464
465
    Expected<InheritedConstructor>
466
    ImportInheritedConstructor(const InheritedConstructor &From);
467
468
    template <typename T>
469
    bool hasSameVisibilityContextAndLinkage(T *Found, T *From);
470
471
    bool IsStructuralMatch(Decl *From, Decl *To, bool Complain = true);
472
    ExpectedDecl VisitDecl(Decl *D);
473
    ExpectedDecl VisitImportDecl(ImportDecl *D);
474
    ExpectedDecl VisitEmptyDecl(EmptyDecl *D);
475
    ExpectedDecl VisitAccessSpecDecl(AccessSpecDecl *D);
476
    ExpectedDecl VisitStaticAssertDecl(StaticAssertDecl *D);
477
    ExpectedDecl VisitTranslationUnitDecl(TranslationUnitDecl *D);
478
    ExpectedDecl VisitBindingDecl(BindingDecl *D);
479
    ExpectedDecl VisitNamespaceDecl(NamespaceDecl *D);
480
    ExpectedDecl VisitNamespaceAliasDecl(NamespaceAliasDecl *D);
481
    ExpectedDecl VisitTypedefNameDecl(TypedefNameDecl *D, bool IsAlias);
482
    ExpectedDecl VisitTypedefDecl(TypedefDecl *D);
483
    ExpectedDecl VisitTypeAliasDecl(TypeAliasDecl *D);
484
    ExpectedDecl VisitTypeAliasTemplateDecl(TypeAliasTemplateDecl *D);
485
    ExpectedDecl VisitLabelDecl(LabelDecl *D);
486
    ExpectedDecl VisitEnumDecl(EnumDecl *D);
487
    ExpectedDecl VisitRecordDecl(RecordDecl *D);
488
    ExpectedDecl VisitEnumConstantDecl(EnumConstantDecl *D);
489
    ExpectedDecl VisitFunctionDecl(FunctionDecl *D);
490
    ExpectedDecl VisitCXXMethodDecl(CXXMethodDecl *D);
491
    ExpectedDecl VisitCXXConstructorDecl(CXXConstructorDecl *D);
492
    ExpectedDecl VisitCXXDestructorDecl(CXXDestructorDecl *D);
493
    ExpectedDecl VisitCXXConversionDecl(CXXConversionDecl *D);
494
    ExpectedDecl VisitCXXDeductionGuideDecl(CXXDeductionGuideDecl *D);
495
    ExpectedDecl VisitFieldDecl(FieldDecl *D);
496
    ExpectedDecl VisitIndirectFieldDecl(IndirectFieldDecl *D);
497
    ExpectedDecl VisitFriendDecl(FriendDecl *D);
498
    ExpectedDecl VisitObjCIvarDecl(ObjCIvarDecl *D);
499
    ExpectedDecl VisitVarDecl(VarDecl *D);
500
    ExpectedDecl VisitImplicitParamDecl(ImplicitParamDecl *D);
501
    ExpectedDecl VisitParmVarDecl(ParmVarDecl *D);
502
    ExpectedDecl VisitObjCMethodDecl(ObjCMethodDecl *D);
503
    ExpectedDecl VisitObjCTypeParamDecl(ObjCTypeParamDecl *D);
504
    ExpectedDecl VisitObjCCategoryDecl(ObjCCategoryDecl *D);
505
    ExpectedDecl VisitObjCProtocolDecl(ObjCProtocolDecl *D);
506
    ExpectedDecl VisitLinkageSpecDecl(LinkageSpecDecl *D);
507
    ExpectedDecl VisitUsingDecl(UsingDecl *D);
508
    ExpectedDecl VisitUsingShadowDecl(UsingShadowDecl *D);
509
    ExpectedDecl VisitUsingDirectiveDecl(UsingDirectiveDecl *D);
510
    ExpectedDecl ImportUsingShadowDecls(BaseUsingDecl *D, BaseUsingDecl *ToSI);
511
    ExpectedDecl VisitUsingEnumDecl(UsingEnumDecl *D);
512
    ExpectedDecl VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D);
513
    ExpectedDecl VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D);
514
    ExpectedDecl VisitBuiltinTemplateDecl(BuiltinTemplateDecl *D);
515
    ExpectedDecl
516
    VisitLifetimeExtendedTemporaryDecl(LifetimeExtendedTemporaryDecl *D);
517
518
    Expected<ObjCTypeParamList *>
519
    ImportObjCTypeParamList(ObjCTypeParamList *list);
520
521
    ExpectedDecl VisitObjCInterfaceDecl(ObjCInterfaceDecl *D);
522
    ExpectedDecl VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D);
523
    ExpectedDecl VisitObjCImplementationDecl(ObjCImplementationDecl *D);
524
    ExpectedDecl VisitObjCPropertyDecl(ObjCPropertyDecl *D);
525
    ExpectedDecl VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D);
526
    ExpectedDecl VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D);
527
    ExpectedDecl VisitNonTypeTemplateParmDecl(NonTypeTemplateParmDecl *D);
528
    ExpectedDecl VisitTemplateTemplateParmDecl(TemplateTemplateParmDecl *D);
529
    ExpectedDecl VisitClassTemplateDecl(ClassTemplateDecl *D);
530
    ExpectedDecl VisitClassTemplateSpecializationDecl(
531
                                            ClassTemplateSpecializationDecl *D);
532
    ExpectedDecl VisitVarTemplateDecl(VarTemplateDecl *D);
533
    ExpectedDecl VisitVarTemplateSpecializationDecl(VarTemplateSpecializationDecl *D);
534
    ExpectedDecl VisitFunctionTemplateDecl(FunctionTemplateDecl *D);
535
536
    // Importing statements
537
    ExpectedStmt VisitStmt(Stmt *S);
538
    ExpectedStmt VisitGCCAsmStmt(GCCAsmStmt *S);
539
    ExpectedStmt VisitDeclStmt(DeclStmt *S);
540
    ExpectedStmt VisitNullStmt(NullStmt *S);
541
    ExpectedStmt VisitCompoundStmt(CompoundStmt *S);
542
    ExpectedStmt VisitCaseStmt(CaseStmt *S);
543
    ExpectedStmt VisitDefaultStmt(DefaultStmt *S);
544
    ExpectedStmt VisitLabelStmt(LabelStmt *S);
545
    ExpectedStmt VisitAttributedStmt(AttributedStmt *S);
546
    ExpectedStmt VisitIfStmt(IfStmt *S);
547
    ExpectedStmt VisitSwitchStmt(SwitchStmt *S);
548
    ExpectedStmt VisitWhileStmt(WhileStmt *S);
549
    ExpectedStmt VisitDoStmt(DoStmt *S);
550
    ExpectedStmt VisitForStmt(ForStmt *S);
551
    ExpectedStmt VisitGotoStmt(GotoStmt *S);
552
    ExpectedStmt VisitIndirectGotoStmt(IndirectGotoStmt *S);
553
    ExpectedStmt VisitContinueStmt(ContinueStmt *S);
554
    ExpectedStmt VisitBreakStmt(BreakStmt *S);
555
    ExpectedStmt VisitReturnStmt(ReturnStmt *S);
556
    // FIXME: MSAsmStmt
557
    // FIXME: SEHExceptStmt
558
    // FIXME: SEHFinallyStmt
559
    // FIXME: SEHTryStmt
560
    // FIXME: SEHLeaveStmt
561
    // FIXME: CapturedStmt
562
    ExpectedStmt VisitCXXCatchStmt(CXXCatchStmt *S);
563
    ExpectedStmt VisitCXXTryStmt(CXXTryStmt *S);
564
    ExpectedStmt VisitCXXForRangeStmt(CXXForRangeStmt *S);
565
    // FIXME: MSDependentExistsStmt
566
    ExpectedStmt VisitObjCForCollectionStmt(ObjCForCollectionStmt *S);
567
    ExpectedStmt VisitObjCAtCatchStmt(ObjCAtCatchStmt *S);
568
    ExpectedStmt VisitObjCAtFinallyStmt(ObjCAtFinallyStmt *S);
569
    ExpectedStmt VisitObjCAtTryStmt(ObjCAtTryStmt *S);
570
    ExpectedStmt VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *S);
571
    ExpectedStmt VisitObjCAtThrowStmt(ObjCAtThrowStmt *S);
572
    ExpectedStmt VisitObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt *S);
573
574
    // Importing expressions
575
    ExpectedStmt VisitExpr(Expr *E);
576
    ExpectedStmt VisitSourceLocExpr(SourceLocExpr *E);
577
    ExpectedStmt VisitVAArgExpr(VAArgExpr *E);
578
    ExpectedStmt VisitChooseExpr(ChooseExpr *E);
579
    ExpectedStmt VisitShuffleVectorExpr(ShuffleVectorExpr *E);
580
    ExpectedStmt VisitGNUNullExpr(GNUNullExpr *E);
581
    ExpectedStmt VisitGenericSelectionExpr(GenericSelectionExpr *E);
582
    ExpectedStmt VisitPredefinedExpr(PredefinedExpr *E);
583
    ExpectedStmt VisitDeclRefExpr(DeclRefExpr *E);
584
    ExpectedStmt VisitImplicitValueInitExpr(ImplicitValueInitExpr *E);
585
    ExpectedStmt VisitDesignatedInitExpr(DesignatedInitExpr *E);
586
    ExpectedStmt VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *E);
587
    ExpectedStmt VisitIntegerLiteral(IntegerLiteral *E);
588
    ExpectedStmt VisitFloatingLiteral(FloatingLiteral *E);
589
    ExpectedStmt VisitImaginaryLiteral(ImaginaryLiteral *E);
590
    ExpectedStmt VisitFixedPointLiteral(FixedPointLiteral *E);
591
    ExpectedStmt VisitCharacterLiteral(CharacterLiteral *E);
592
    ExpectedStmt VisitStringLiteral(StringLiteral *E);
593
    ExpectedStmt VisitCompoundLiteralExpr(CompoundLiteralExpr *E);
594
    ExpectedStmt VisitAtomicExpr(AtomicExpr *E);
595
    ExpectedStmt VisitAddrLabelExpr(AddrLabelExpr *E);
596
    ExpectedStmt VisitConstantExpr(ConstantExpr *E);
597
    ExpectedStmt VisitParenExpr(ParenExpr *E);
598
    ExpectedStmt VisitParenListExpr(ParenListExpr *E);
599
    ExpectedStmt VisitStmtExpr(StmtExpr *E);
600
    ExpectedStmt VisitUnaryOperator(UnaryOperator *E);
601
    ExpectedStmt VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *E);
602
    ExpectedStmt VisitBinaryOperator(BinaryOperator *E);
603
    ExpectedStmt VisitConditionalOperator(ConditionalOperator *E);
604
    ExpectedStmt VisitBinaryConditionalOperator(BinaryConditionalOperator *E);
605
    ExpectedStmt VisitOpaqueValueExpr(OpaqueValueExpr *E);
606
    ExpectedStmt VisitArrayTypeTraitExpr(ArrayTypeTraitExpr *E);
607
    ExpectedStmt VisitExpressionTraitExpr(ExpressionTraitExpr *E);
608
    ExpectedStmt VisitArraySubscriptExpr(ArraySubscriptExpr *E);
609
    ExpectedStmt VisitCompoundAssignOperator(CompoundAssignOperator *E);
610
    ExpectedStmt VisitImplicitCastExpr(ImplicitCastExpr *E);
611
    ExpectedStmt VisitExplicitCastExpr(ExplicitCastExpr *E);
612
    ExpectedStmt VisitOffsetOfExpr(OffsetOfExpr *OE);
613
    ExpectedStmt VisitCXXThrowExpr(CXXThrowExpr *E);
614
    ExpectedStmt VisitCXXNoexceptExpr(CXXNoexceptExpr *E);
615
    ExpectedStmt VisitCXXDefaultArgExpr(CXXDefaultArgExpr *E);
616
    ExpectedStmt VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E);
617
    ExpectedStmt VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E);
618
    ExpectedStmt VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E);
619
    ExpectedStmt VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E);
620
    ExpectedStmt VisitPackExpansionExpr(PackExpansionExpr *E);
621
    ExpectedStmt VisitSizeOfPackExpr(SizeOfPackExpr *E);
622
    ExpectedStmt VisitCXXNewExpr(CXXNewExpr *E);
623
    ExpectedStmt VisitCXXDeleteExpr(CXXDeleteExpr *E);
624
    ExpectedStmt VisitCXXConstructExpr(CXXConstructExpr *E);
625
    ExpectedStmt VisitCXXMemberCallExpr(CXXMemberCallExpr *E);
626
    ExpectedStmt VisitCXXDependentScopeMemberExpr(CXXDependentScopeMemberExpr *E);
627
    ExpectedStmt VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E);
628
    ExpectedStmt VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *E);
629
    ExpectedStmt VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E);
630
    ExpectedStmt VisitUnresolvedMemberExpr(UnresolvedMemberExpr *E);
631
    ExpectedStmt VisitExprWithCleanups(ExprWithCleanups *E);
632
    ExpectedStmt VisitCXXThisExpr(CXXThisExpr *E);
633
    ExpectedStmt VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E);
634
    ExpectedStmt VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E);
635
    ExpectedStmt VisitMemberExpr(MemberExpr *E);
636
    ExpectedStmt VisitCallExpr(CallExpr *E);
637
    ExpectedStmt VisitLambdaExpr(LambdaExpr *LE);
638
    ExpectedStmt VisitInitListExpr(InitListExpr *E);
639
    ExpectedStmt VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E);
640
    ExpectedStmt VisitCXXInheritedCtorInitExpr(CXXInheritedCtorInitExpr *E);
641
    ExpectedStmt VisitArrayInitLoopExpr(ArrayInitLoopExpr *E);
642
    ExpectedStmt VisitArrayInitIndexExpr(ArrayInitIndexExpr *E);
643
    ExpectedStmt VisitCXXDefaultInitExpr(CXXDefaultInitExpr *E);
644
    ExpectedStmt VisitCXXNamedCastExpr(CXXNamedCastExpr *E);
645
    ExpectedStmt VisitSubstNonTypeTemplateParmExpr(SubstNonTypeTemplateParmExpr *E);
646
    ExpectedStmt VisitTypeTraitExpr(TypeTraitExpr *E);
647
    ExpectedStmt VisitCXXTypeidExpr(CXXTypeidExpr *E);
648
    ExpectedStmt VisitCXXFoldExpr(CXXFoldExpr *E);
649
650
    // Helper for chaining together multiple imports. If an error is detected,
651
    // subsequent imports will return default constructed nodes, so that failure
652
    // can be detected with a single conditional branch after a sequence of
653
    // imports.
654
25.5M
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
25.5M
      if (Err)
657
648
        return T{};
658
25.5M
      Expected<T> MaybeVal = import(From);
659
25.5M
      if (!MaybeVal) {
660
344
        Err = MaybeVal.takeError();
661
344
        return T{};
662
344
      }
663
25.5M
      return *MaybeVal;
664
25.5M
    }
clang::QualType clang::ASTNodeImporter::importChecked<clang::QualType>(llvm::Error&, clang::QualType const&)
Line
Count
Source
654
4.20M
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
4.20M
      if (Err)
657
4
        return T{};
658
4.20M
      Expected<T> MaybeVal = import(From);
659
4.20M
      if (!MaybeVal) {
660
340
        Err = MaybeVal.takeError();
661
340
        return T{};
662
340
      }
663
4.20M
      return *MaybeVal;
664
4.20M
    }
clang::Expr const* clang::ASTNodeImporter::importChecked<clang::Expr const*>(llvm::Error&, clang::Expr const* const&)
Line
Count
Source
654
6.86k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
6.86k
      if (Err)
657
0
        return T{};
658
6.86k
      Expected<T> MaybeVal = import(From);
659
6.86k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
6.86k
      return *MaybeVal;
664
6.86k
    }
clang::Expr* clang::ASTNodeImporter::importChecked<clang::Expr*>(llvm::Error&, clang::Expr* const&)
Line
Count
Source
654
2.92M
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
2.92M
      if (Err)
657
13
        return T{};
658
2.92M
      Expected<T> MaybeVal = import(From);
659
2.92M
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
2.92M
      return *MaybeVal;
664
2.92M
    }
clang::SourceRange clang::ASTNodeImporter::importChecked<clang::SourceRange>(llvm::Error&, clang::SourceRange const&)
Line
Count
Source
654
736k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
736k
      if (Err)
657
0
        return T{};
658
736k
      Expected<T> MaybeVal = import(From);
659
736k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
736k
      return *MaybeVal;
664
736k
    }
clang::FunctionDecl* clang::ASTNodeImporter::importChecked<clang::FunctionDecl*>(llvm::Error&, clang::FunctionDecl* const&)
Line
Count
Source
654
886k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
886k
      if (Err)
657
0
        return T{};
658
886k
      Expected<T> MaybeVal = import(From);
659
886k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
886k
      return *MaybeVal;
664
886k
    }
clang::UnresolvedUsingTypenameDecl* clang::ASTNodeImporter::importChecked<clang::UnresolvedUsingTypenameDecl*>(llvm::Error&, clang::UnresolvedUsingTypenameDecl* const&)
Line
Count
Source
654
196
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
196
      if (Err)
657
0
        return T{};
658
196
      Expected<T> MaybeVal = import(From);
659
196
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
196
      return *MaybeVal;
664
196
    }
clang::Decl* clang::ASTNodeImporter::importChecked<clang::Decl*>(llvm::Error&, clang::Decl* const&)
Line
Count
Source
654
196
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
196
      if (Err)
657
0
        return T{};
658
196
      Expected<T> MaybeVal = import(From);
659
196
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
196
      return *MaybeVal;
664
196
    }
clang::ValueDecl* clang::ASTNodeImporter::importChecked<clang::ValueDecl*>(llvm::Error&, clang::ValueDecl* const&)
Line
Count
Source
654
987k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
987k
      if (Err)
657
4
        return T{};
658
987k
      Expected<T> MaybeVal = import(From);
659
987k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
987k
      return *MaybeVal;
664
987k
    }
clang::SourceLocation clang::ASTNodeImporter::importChecked<clang::SourceLocation>(llvm::Error&, clang::SourceLocation const&)
Line
Count
Source
654
9.01M
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
9.01M
      if (Err)
657
274
        return T{};
658
9.01M
      Expected<T> MaybeVal = import(From);
659
9.01M
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
9.01M
      return *MaybeVal;
664
9.01M
    }
clang::StringLiteral* clang::ASTNodeImporter::importChecked<clang::StringLiteral*>(llvm::Error&, clang::StringLiteral* const&)
Line
Count
Source
654
7.97k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
7.97k
      if (Err)
657
0
        return T{};
658
7.97k
      Expected<T> MaybeVal = import(From);
659
7.97k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
7.97k
      return *MaybeVal;
664
7.97k
    }
clang::NestedNameSpecifierLoc clang::ASTNodeImporter::importChecked<clang::NestedNameSpecifierLoc>(llvm::Error&, clang::NestedNameSpecifierLoc const&)
Line
Count
Source
654
2.22M
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
2.22M
      if (Err)
657
13
        return T{};
658
2.22M
      Expected<T> MaybeVal = import(From);
659
2.22M
      if (!MaybeVal) {
660
4
        Err = MaybeVal.takeError();
661
4
        return T{};
662
4
      }
663
2.22M
      return *MaybeVal;
664
2.22M
    }
clang::NamespaceDecl* clang::ASTNodeImporter::importChecked<clang::NamespaceDecl*>(llvm::Error&, clang::NamespaceDecl* const&)
Line
Count
Source
654
128
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
128
      if (Err)
657
0
        return T{};
658
128
      Expected<T> MaybeVal = import(From);
659
128
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
128
      return *MaybeVal;
664
128
    }
clang::TypeSourceInfo* clang::ASTNodeImporter::importChecked<clang::TypeSourceInfo*>(llvm::Error&, clang::TypeSourceInfo* const&)
Line
Count
Source
654
1.83M
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
1.83M
      if (Err)
657
340
        return T{};
658
1.83M
      Expected<T> MaybeVal = import(From);
659
1.83M
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
1.83M
      return *MaybeVal;
664
1.83M
    }
clang::TemplateParameterList* clang::ASTNodeImporter::importChecked<clang::TemplateParameterList*>(llvm::Error&, clang::TemplateParameterList* const&)
Line
Count
Source
654
5.40k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
5.40k
      if (Err)
657
0
        return T{};
658
5.40k
      Expected<T> MaybeVal = import(From);
659
5.40k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
5.40k
      return *MaybeVal;
664
5.40k
    }
clang::TypeAliasDecl* clang::ASTNodeImporter::importChecked<clang::TypeAliasDecl*>(llvm::Error&, clang::TypeAliasDecl* const&)
Line
Count
Source
654
5.40k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
5.40k
      if (Err)
657
0
        return T{};
658
5.40k
      Expected<T> MaybeVal = import(From);
659
5.40k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
5.40k
      return *MaybeVal;
664
5.40k
    }
clang::CXXConstructorDecl* clang::ASTNodeImporter::importChecked<clang::CXXConstructorDecl*>(llvm::Error&, clang::CXXConstructorDecl* const&)
Line
Count
Source
654
13.0k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
13.0k
      if (Err)
657
0
        return T{};
658
13.0k
      Expected<T> MaybeVal = import(From);
659
13.0k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
13.0k
      return *MaybeVal;
664
13.0k
    }
clang::DeclarationName clang::ASTNodeImporter::importChecked<clang::DeclarationName>(llvm::Error&, clang::DeclarationName const&)
Line
Count
Source
654
1.59M
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
1.59M
      if (Err)
657
0
        return T{};
658
1.59M
      Expected<T> MaybeVal = import(From);
659
1.59M
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
1.59M
      return *MaybeVal;
664
1.59M
    }
clang::ConstructorUsingShadowDecl* clang::ASTNodeImporter::importChecked<clang::ConstructorUsingShadowDecl*>(llvm::Error&, clang::ConstructorUsingShadowDecl* const&)
Line
Count
Source
654
171
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
171
      if (Err)
657
0
        return T{};
658
171
      Expected<T> MaybeVal = import(From);
659
171
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
171
      return *MaybeVal;
664
171
    }
clang::EnumDecl* clang::ASTNodeImporter::importChecked<clang::EnumDecl*>(llvm::Error&, clang::EnumDecl* const&)
Line
Count
Source
654
8
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
8
      if (Err)
657
0
        return T{};
658
8
      Expected<T> MaybeVal = import(From);
659
8
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
8
      return *MaybeVal;
664
8
    }
clang::Selector clang::ASTNodeImporter::importChecked<clang::Selector>(llvm::Error&, clang::Selector const&)
Line
Count
Source
654
4.62k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
4.62k
      if (Err)
657
0
        return T{};
658
4.62k
      Expected<T> MaybeVal = import(From);
659
4.62k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
4.62k
      return *MaybeVal;
664
4.62k
    }
clang::ObjCMethodDecl* clang::ASTNodeImporter::importChecked<clang::ObjCMethodDecl*>(llvm::Error&, clang::ObjCMethodDecl* const&)
Line
Count
Source
654
4.62k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
4.62k
      if (Err)
657
0
        return T{};
658
4.62k
      Expected<T> MaybeVal = import(From);
659
4.62k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
4.62k
      return *MaybeVal;
664
4.62k
    }
clang::ObjCIvarDecl* clang::ASTNodeImporter::importChecked<clang::ObjCIvarDecl*>(llvm::Error&, clang::ObjCIvarDecl* const&)
Line
Count
Source
654
2.31k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
2.31k
      if (Err)
657
0
        return T{};
658
2.31k
      Expected<T> MaybeVal = import(From);
659
2.31k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
2.31k
      return *MaybeVal;
664
2.31k
    }
clang::NamedDecl* clang::ASTNodeImporter::importChecked<clang::NamedDecl*>(llvm::Error&, clang::NamedDecl* const&)
Line
Count
Source
654
441k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
441k
      if (Err)
657
0
        return T{};
658
441k
      Expected<T> MaybeVal = import(From);
659
441k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
441k
      return *MaybeVal;
664
441k
    }
Unexecuted instantiation: clang::ConceptDecl* clang::ASTNodeImporter::importChecked<clang::ConceptDecl*>(llvm::Error&, clang::ConceptDecl* const&)
clang::DeclGroupRef clang::ASTNodeImporter::importChecked<clang::DeclGroupRef>(llvm::Error&, clang::DeclGroupRef const&)
Line
Count
Source
654
107k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
107k
      if (Err)
657
0
        return T{};
658
107k
      Expected<T> MaybeVal = import(From);
659
107k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
107k
      return *MaybeVal;
664
107k
    }
clang::Stmt* clang::ASTNodeImporter::importChecked<clang::Stmt*>(llvm::Error&, clang::Stmt* const&)
Line
Count
Source
654
234k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
234k
      if (Err)
657
0
        return T{};
658
234k
      Expected<T> MaybeVal = import(From);
659
234k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
234k
      return *MaybeVal;
664
234k
    }
clang::LabelDecl* clang::ASTNodeImporter::importChecked<clang::LabelDecl*>(llvm::Error&, clang::LabelDecl* const&)
Line
Count
Source
654
68
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
68
      if (Err)
657
0
        return T{};
658
68
      Expected<T> MaybeVal = import(From);
659
68
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
68
      return *MaybeVal;
664
68
    }
clang::VarDecl* clang::ASTNodeImporter::importChecked<clang::VarDecl*>(llvm::Error&, clang::VarDecl* const&)
Line
Count
Source
654
83.9k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
83.9k
      if (Err)
657
0
        return T{};
658
83.9k
      Expected<T> MaybeVal = import(From);
659
83.9k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
83.9k
      return *MaybeVal;
664
83.9k
    }
clang::VarDecl const* clang::ASTNodeImporter::importChecked<clang::VarDecl const*>(llvm::Error&, clang::VarDecl const* const&)
Line
Count
Source
654
133k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
133k
      if (Err)
657
0
        return T{};
658
133k
      Expected<T> MaybeVal = import(From);
659
133k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
133k
      return *MaybeVal;
664
133k
    }
clang::DeclStmt* clang::ASTNodeImporter::importChecked<clang::DeclStmt*>(llvm::Error&, clang::DeclStmt* const&)
Line
Count
Source
654
788
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
788
      if (Err)
657
0
        return T{};
658
788
      Expected<T> MaybeVal = import(From);
659
788
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
788
      return *MaybeVal;
664
788
    }
clang::ObjCAtFinallyStmt* clang::ASTNodeImporter::importChecked<clang::ObjCAtFinallyStmt*>(llvm::Error&, clang::ObjCAtFinallyStmt* const&)
Line
Count
Source
654
6
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
6
      if (Err)
657
0
        return T{};
658
6
      Expected<T> MaybeVal = import(From);
659
6
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
6
      return *MaybeVal;
664
6
    }
clang::CompoundStmt* clang::ASTNodeImporter::importChecked<clang::CompoundStmt*>(llvm::Error&, clang::CompoundStmt* const&)
Line
Count
Source
654
4
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
4
      if (Err)
657
0
        return T{};
658
4
      Expected<T> MaybeVal = import(From);
659
4
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
4
      return *MaybeVal;
664
4
    }
clang::APValue clang::ASTNodeImporter::importChecked<clang::APValue>(llvm::Error&, clang::APValue const&)
Line
Count
Source
654
34.6k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
34.6k
      if (Err)
657
0
        return T{};
658
34.6k
      Expected<T> MaybeVal = import(From);
659
34.6k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
34.6k
      return *MaybeVal;
664
34.6k
    }
clang::OpaqueValueExpr* clang::ASTNodeImporter::importChecked<clang::OpaqueValueExpr*>(llvm::Error&, clang::OpaqueValueExpr* const&)
Line
Count
Source
654
72
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
72
      if (Err)
657
0
        return T{};
658
72
      Expected<T> MaybeVal = import(From);
659
72
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
72
      return *MaybeVal;
664
72
    }
clang::LifetimeExtendedTemporaryDecl* clang::ASTNodeImporter::importChecked<clang::LifetimeExtendedTemporaryDecl*>(llvm::Error&, clang::LifetimeExtendedTemporaryDecl* const&)
Line
Count
Source
654
4.81k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
4.81k
      if (Err)
657
0
        return T{};
658
4.81k
      Expected<T> MaybeVal = import(From);
659
4.81k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
4.81k
      return *MaybeVal;
664
4.81k
    }
llvm::Optional<clang::Expr*> clang::ASTNodeImporter::importChecked<llvm::Optional<clang::Expr*> >(llvm::Error&, llvm::Optional<clang::Expr*> const&)
Line
Count
Source
654
1.08k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
1.08k
      if (Err)
657
0
        return T{};
658
1.08k
      Expected<T> MaybeVal = import(From);
659
1.08k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
1.08k
      return *MaybeVal;
664
1.08k
    }
clang::NonTypeTemplateParmDecl* clang::ASTNodeImporter::importChecked<clang::NonTypeTemplateParmDecl*>(llvm::Error&, clang::NonTypeTemplateParmDecl* const&)
Line
Count
Source
654
19.5k
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
19.5k
      if (Err)
657
0
        return T{};
658
19.5k
      Expected<T> MaybeVal = import(From);
659
19.5k
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
19.5k
      return *MaybeVal;
664
19.5k
    }
clang::UnresolvedLookupExpr* clang::ASTNodeImporter::importChecked<clang::UnresolvedLookupExpr*>(llvm::Error&, clang::UnresolvedLookupExpr* const&)
Line
Count
Source
654
16
    template <typename T> T importChecked(Error &Err, const T &From) {
655
      // Don't attempt to import nodes if we hit an error earlier.
656
16
      if (Err)
657
0
        return T{};
658
16
      Expected<T> MaybeVal = import(From);
659
16
      if (!MaybeVal) {
660
0
        Err = MaybeVal.takeError();
661
0
        return T{};
662
0
      }
663
16
      return *MaybeVal;
664
16
    }
Unexecuted instantiation: clang::FieldDecl const* clang::ASTNodeImporter::importChecked<clang::FieldDecl const*>(llvm::Error&, clang::FieldDecl const* const&)
Unexecuted instantiation: clang::AddrLabelExpr const* clang::ASTNodeImporter::importChecked<clang::AddrLabelExpr const*>(llvm::Error&, clang::AddrLabelExpr const* const&)
Unexecuted instantiation: clang::ValueDecl const* clang::ASTNodeImporter::importChecked<clang::ValueDecl const*>(llvm::Error&, clang::ValueDecl const* const&)
Unexecuted instantiation: clang::CXXRecordDecl const* clang::ASTNodeImporter::importChecked<clang::CXXRecordDecl const*>(llvm::Error&, clang::CXXRecordDecl const* const&)
Unexecuted instantiation: clang::Type const* clang::ASTNodeImporter::importChecked<clang::Type const*>(llvm::Error&, clang::Type const* const&)
Unexecuted instantiation: clang::Decl const* clang::ASTNodeImporter::importChecked<clang::Decl const*>(llvm::Error&, clang::Decl const* const&)
665
666
    template<typename IIter, typename OIter>
667
1.22M
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
1.22M
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
3.07M
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin1.84M
) {
670
1.84M
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
1.84M
        if (!ToOrErr)
672
28
          return ToOrErr.takeError();
673
1.84M
        *Obegin = *ToOrErr;
674
1.84M
      }
675
1.22M
      return Error::success();
676
1.22M
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::NamedDecl* const*, clang::NamedDecl**>(clang::NamedDecl* const*, clang::NamedDecl* const*, clang::NamedDecl**)
Line
Count
Source
667
267k
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
267k
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
767k
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin499k
) {
670
499k
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
499k
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
499k
        *Obegin = *ToOrErr;
674
499k
      }
675
267k
      return Error::success();
676
267k
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::CXXCtorInitializer**, clang::CXXCtorInitializer**>(clang::CXXCtorInitializer**, clang::CXXCtorInitializer**, clang::CXXCtorInitializer**)
Line
Count
Source
667
24.1k
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
24.1k
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
60.5k
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin36.4k
) {
670
36.4k
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
36.4k
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
36.4k
        *Obegin = *ToOrErr;
674
36.4k
      }
675
24.1k
      return Error::success();
676
24.1k
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::BindingDecl* const*, clang::BindingDecl**>(clang::BindingDecl* const*, clang::BindingDecl* const*, clang::BindingDecl**)
Line
Count
Source
667
48
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
48
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
144
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin96
) {
670
96
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
96
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
96
        *Obegin = *ToOrErr;
674
96
      }
675
48
      return Error::success();
676
48
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*>, clang::Expr**>(clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*>, clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*>, clang::Expr**)
Line
Count
Source
667
593k
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
593k
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
1.30M
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin707k
) {
670
707k
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
707k
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
707k
        *Obegin = *ToOrErr;
674
707k
      }
675
593k
      return Error::success();
676
593k
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::Stmt::CastIterator<clang::AddrLabelExpr, clang::AddrLabelExpr*, clang::Stmt*>, clang::Expr**>(clang::Stmt::CastIterator<clang::AddrLabelExpr, clang::AddrLabelExpr*, clang::Stmt*>, clang::Stmt::CastIterator<clang::AddrLabelExpr, clang::AddrLabelExpr*, clang::Stmt*>, clang::Expr**)
Line
Count
Source
667
3
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
3
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
3
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin0
) {
670
0
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
0
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
0
        *Obegin = *ToOrErr;
674
0
      }
675
3
      return Error::success();
676
3
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::Stmt**, clang::Stmt**>(clang::Stmt**, clang::Stmt**, clang::Stmt**)
Line
Count
Source
667
230k
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
230k
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
709k
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin479k
) {
670
479k
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
479k
        if (!ToOrErr)
672
28
          return ToOrErr.takeError();
673
479k
        *Obegin = *ToOrErr;
674
479k
      }
675
230k
      return Error::success();
676
230k
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::Attr const* const*, clang::Attr const**>(clang::Attr const* const*, clang::Attr const* const*, clang::Attr const**)
Line
Count
Source
667
8
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
8
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
16
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin8
) {
670
8
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
8
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
8
        *Obegin = *ToOrErr;
674
8
      }
675
8
      return Error::success();
676
8
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::Expr* const*, clang::Expr**>(clang::Expr* const*, clang::Expr* const*, clang::Expr**)
Line
Count
Source
667
41.5k
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
41.5k
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
100k
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin59.2k
) {
670
59.2k
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
59.2k
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
59.2k
        *Obegin = *ToOrErr;
674
59.2k
      }
675
41.5k
      return Error::success();
676
41.5k
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::TypeSourceInfo const* const*, clang::TypeSourceInfo**>(clang::TypeSourceInfo const* const*, clang::TypeSourceInfo const* const*, clang::TypeSourceInfo**)
Line
Count
Source
667
11
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
11
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
33
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin22
) {
670
22
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
22
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
22
        *Obegin = *ToOrErr;
674
22
      }
675
11
      return Error::success();
676
11
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::Expr const* const*, clang::Expr**>(clang::Expr const* const*, clang::Expr const* const*, clang::Expr**)
Line
Count
Source
667
11
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
11
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
33
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin22
) {
670
22
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
22
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
22
        *Obegin = *ToOrErr;
674
22
      }
675
11
      return Error::success();
676
11
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::DesignatedInitExpr::Designator*, clang::DesignatedInitExpr::Designator*>(clang::DesignatedInitExpr::Designator*, clang::DesignatedInitExpr::Designator*, clang::DesignatedInitExpr::Designator*)
Line
Count
Source
667
44
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
44
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
117
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin73
) {
670
73
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
73
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
73
        *Obegin = *ToOrErr;
674
73
      }
675
44
      return Error::success();
676
44
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::SourceLocation const*, clang::SourceLocation*>(clang::SourceLocation const*, clang::SourceLocation const*, clang::SourceLocation*)
Line
Count
Source
667
18.8k
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
18.8k
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
34.2k
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin15.3k
) {
670
15.3k
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
15.3k
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
15.3k
        *Obegin = *ToOrErr;
674
15.3k
      }
675
18.8k
      return Error::success();
676
18.8k
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::Expr**, clang::Expr**>(clang::Expr**, clang::Expr**, clang::Expr**)
Line
Count
Source
667
40.0k
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
40.0k
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
75.1k
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin35.1k
) {
670
35.1k
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
35.1k
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
35.1k
        *Obegin = *ToOrErr;
674
35.1k
      }
675
40.0k
      return Error::success();
676
40.0k
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> const*, llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*>*>(llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> const*, llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> const*, llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*>*)
Line
Count
Source
667
3.93k
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
3.93k
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
3.93k
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin2
) {
670
2
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
2
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
2
        *Obegin = *ToOrErr;
674
2
      }
675
3.93k
      return Error::success();
676
3.93k
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<clang::TypeSourceInfo* const*, clang::TypeSourceInfo**>(clang::TypeSourceInfo* const*, clang::TypeSourceInfo* const*, clang::TypeSourceInfo**)
Line
Count
Source
667
7.92k
    Error ImportArrayChecked(IIter Ibegin, IIter Iend, OIter Obegin) {
668
7.92k
      using ItemT = std::remove_reference_t<decltype(*Obegin)>;
669
19.3k
      for (; Ibegin != Iend; 
++Ibegin, ++Obegin11.4k
) {
670
11.4k
        Expected<ItemT> ToOrErr = import(*Ibegin);
671
11.4k
        if (!ToOrErr)
672
0
          return ToOrErr.takeError();
673
11.4k
        *Obegin = *ToOrErr;
674
11.4k
      }
675
7.92k
      return Error::success();
676
7.92k
    }
677
678
    // Import every item from a container structure into an output container.
679
    // If error occurs, stops at first error and returns the error.
680
    // The output container should have space for all needed elements (it is not
681
    // expanded, new items are put into from the beginning).
682
    template<typename InContainerTy, typename OutContainerTy>
683
    Error ImportContainerChecked(
684
1.17M
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
1.17M
      return ImportArrayChecked(
686
1.17M
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
1.17M
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<clang::TemplateParameterList, llvm::SmallVector<clang::NamedDecl*, 4u> >(clang::TemplateParameterList const&, llvm::SmallVector<clang::NamedDecl*, 4u>&)
Line
Count
Source
684
267k
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
267k
      return ImportArrayChecked(
686
267k
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
267k
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::iterator_range<clang::CXXCtorInitializer**>, llvm::SmallVector<clang::CXXCtorInitializer*, 4u> >(llvm::iterator_range<clang::CXXCtorInitializer**> const&, llvm::SmallVector<clang::CXXCtorInitializer*, 4u>&)
Line
Count
Source
684
24.1k
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
24.1k
      return ImportArrayChecked(
686
24.1k
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
24.1k
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::SmallVector<clang::SourceLocation, 12u>, llvm::SmallVector<clang::SourceLocation, 12u> >(llvm::SmallVector<clang::SourceLocation, 12u> const&, llvm::SmallVector<clang::SourceLocation, 12u>&)
Line
Count
Source
684
8.59k
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
8.59k
      return ImportArrayChecked(
686
8.59k
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
8.59k
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*> >, llvm::SmallVector<clang::Expr*, 4u> >(llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*> > const&, llvm::SmallVector<clang::Expr*, 4u>&)
Line
Count
Source
684
15.1k
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
15.1k
      return ImportArrayChecked(
686
15.1k
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
15.1k
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::iterator_range<clang::Stmt**>, llvm::SmallVector<clang::Stmt*, 8u> >(llvm::iterator_range<clang::Stmt**> const&, llvm::SmallVector<clang::Stmt*, 8u>&)
Line
Count
Source
684
230k
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
230k
      return ImportArrayChecked(
686
230k
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
230k
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::ArrayRef<clang::Attr const*>, llvm::SmallVector<clang::Attr const*, 1u> >(llvm::ArrayRef<clang::Attr const*> const&, llvm::SmallVector<clang::Attr const*, 1u>&)
Line
Count
Source
684
8
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
8
      return ImportArrayChecked(
686
8
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
8
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::ArrayRef<clang::Expr*>, llvm::SmallVector<clang::Expr*, 8u> >(llvm::ArrayRef<clang::Expr*> const&, llvm::SmallVector<clang::Expr*, 8u>&)
Line
Count
Source
684
4
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
4
      return ImportArrayChecked(
686
4
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
4
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::ArrayRef<clang::TypeSourceInfo const*>, llvm::SmallVector<clang::TypeSourceInfo*, 1u> >(llvm::ArrayRef<clang::TypeSourceInfo const*> const&, llvm::SmallVector<clang::TypeSourceInfo*, 1u>&)
Line
Count
Source
684
11
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
11
      return ImportArrayChecked(
686
11
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
11
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::ArrayRef<clang::Expr const*>, llvm::SmallVector<clang::Expr*, 1u> >(llvm::ArrayRef<clang::Expr const*> const&, llvm::SmallVector<clang::Expr*, 1u>&)
Line
Count
Source
684
11
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
11
      return ImportArrayChecked(
686
11
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
11
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::MutableArrayRef<clang::DesignatedInitExpr::Designator>, llvm::SmallVector<clang::DesignatedInitExpr::Designator, 4u> >(llvm::MutableArrayRef<clang::DesignatedInitExpr::Designator> const&, llvm::SmallVector<clang::DesignatedInitExpr::Designator, 4u>&)
Line
Count
Source
684
44
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
44
      return ImportArrayChecked(
686
44
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
44
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::ArrayRef<clang::Expr*>, llvm::SmallVector<clang::Expr*, 4u> >(llvm::ArrayRef<clang::Expr*> const&, llvm::SmallVector<clang::Expr*, 4u>&)
Line
Count
Source
684
41.5k
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
41.5k
      return ImportArrayChecked(
686
41.5k
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
41.5k
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*> >, llvm::SmallVector<clang::Expr*, 8u> >(llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*> > const&, llvm::SmallVector<clang::Expr*, 8u>&)
Line
Count
Source
684
5.98k
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
5.98k
      return ImportArrayChecked(
686
5.98k
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
5.98k
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*> >, llvm::SmallVector<clang::Expr*, 6u> >(llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*> > const&, llvm::SmallVector<clang::Expr*, 6u>&)
Line
Count
Source
684
6.95k
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
6.95k
      return ImportArrayChecked(
686
6.95k
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
6.95k
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::ArrayRef<llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> >, llvm::SmallVector<llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*>, 8u> >(llvm::ArrayRef<llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> > const&, llvm::SmallVector<llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*>, 8u>&)
Line
Count
Source
684
3.93k
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
3.93k
      return ImportArrayChecked(
686
3.93k
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
3.93k
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*> >, llvm::SmallVector<clang::Expr*, 2u> >(llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*> > const&, llvm::SmallVector<clang::Expr*, 2u>&)
Line
Count
Source
684
565k
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
565k
      return ImportArrayChecked(
686
565k
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
565k
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::iterator_range<clang::Expr**>, llvm::SmallVector<clang::Expr*, 8u> >(llvm::iterator_range<clang::Expr**> const&, llvm::SmallVector<clang::Expr*, 8u>&)
Line
Count
Source
684
59
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
59
      return ImportArrayChecked(
686
59
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
59
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::ArrayRef<clang::TypeSourceInfo*>, llvm::SmallVector<clang::TypeSourceInfo*, 4u> >(llvm::ArrayRef<clang::TypeSourceInfo*> const&, llvm::SmallVector<clang::TypeSourceInfo*, 4u>&)
Line
Count
Source
684
7.92k
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
7.92k
      return ImportArrayChecked(
686
7.92k
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
7.92k
    }
llvm::Error clang::ASTNodeImporter::ImportContainerChecked<llvm::iterator_range<clang::Expr**>, llvm::SmallVector<clang::Expr*, 2u> >(llvm::iterator_range<clang::Expr**> const&, llvm::SmallVector<clang::Expr*, 2u>&)
Line
Count
Source
684
48
        const InContainerTy &InContainer, OutContainerTy &OutContainer) {
685
48
      return ImportArrayChecked(
686
48
          InContainer.begin(), InContainer.end(), OutContainer.begin());
687
48
    }
688
689
    template<typename InContainerTy, typename OIter>
690
54
    Error ImportArrayChecked(const InContainerTy &InContainer, OIter Obegin) {
691
54
      return ImportArrayChecked(InContainer.begin(), InContainer.end(), Obegin);
692
54
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<llvm::ArrayRef<clang::BindingDecl*>, clang::BindingDecl**>(llvm::ArrayRef<clang::BindingDecl*> const&, clang::BindingDecl**)
Line
Count
Source
690
48
    Error ImportArrayChecked(const InContainerTy &InContainer, OIter Obegin) {
691
48
      return ImportArrayChecked(InContainer.begin(), InContainer.end(), Obegin);
692
48
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*> >, clang::Expr**>(llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr*, clang::Stmt*> > const&, clang::Expr**)
Line
Count
Source
690
3
    Error ImportArrayChecked(const InContainerTy &InContainer, OIter Obegin) {
691
3
      return ImportArrayChecked(InContainer.begin(), InContainer.end(), Obegin);
692
3
    }
llvm::Error clang::ASTNodeImporter::ImportArrayChecked<llvm::iterator_range<clang::Stmt::CastIterator<clang::AddrLabelExpr, clang::AddrLabelExpr*, clang::Stmt*> >, clang::Expr**>(llvm::iterator_range<clang::Stmt::CastIterator<clang::AddrLabelExpr, clang::AddrLabelExpr*, clang::Stmt*> > const&, clang::Expr**)
Line
Count
Source
690
3
    Error ImportArrayChecked(const InContainerTy &InContainer, OIter Obegin) {
691
3
      return ImportArrayChecked(InContainer.begin(), InContainer.end(), Obegin);
692
3
    }
693
694
    Error ImportOverriddenMethods(CXXMethodDecl *ToMethod,
695
                                  CXXMethodDecl *FromMethod);
696
697
    Expected<FunctionDecl *> FindFunctionTemplateSpecialization(
698
        FunctionDecl *FromFD);
699
700
    // Returns true if the given function has a placeholder return type and
701
    // that type is declared inside the body of the function.
702
    // E.g. auto f() { struct X{}; return X(); }
703
    bool hasAutoReturnTypeDeclaredInside(FunctionDecl *D);
704
  };
705
706
template <typename InContainerTy>
707
Error ASTNodeImporter::ImportTemplateArgumentListInfo(
708
    SourceLocation FromLAngleLoc, SourceLocation FromRAngleLoc,
709
26.1k
    const InContainerTy &Container, TemplateArgumentListInfo &Result) {
710
26.1k
  auto ToLAngleLocOrErr = import(FromLAngleLoc);
711
26.1k
  if (!ToLAngleLocOrErr)
712
0
    return ToLAngleLocOrErr.takeError();
713
26.1k
  auto ToRAngleLocOrErr = import(FromRAngleLoc);
714
26.1k
  if (!ToRAngleLocOrErr)
715
0
    return ToRAngleLocOrErr.takeError();
716
717
26.1k
  TemplateArgumentListInfo ToTAInfo(*ToLAngleLocOrErr, *ToRAngleLocOrErr);
718
26.1k
  if (auto Err = ImportTemplateArgumentListInfo(Container, ToTAInfo))
719
0
    return Err;
720
26.1k
  Result = ToTAInfo;
721
26.1k
  return Error::success();
722
26.1k
}
723
724
template <>
725
Error ASTNodeImporter::ImportTemplateArgumentListInfo<TemplateArgumentListInfo>(
726
330
    const TemplateArgumentListInfo &From, TemplateArgumentListInfo &Result) {
727
330
  return ImportTemplateArgumentListInfo(
728
330
      From.getLAngleLoc(), From.getRAngleLoc(), From.arguments(), Result);
729
330
}
730
731
template <>
732
Error ASTNodeImporter::ImportTemplateArgumentListInfo<
733
    ASTTemplateArgumentListInfo>(
734
        const ASTTemplateArgumentListInfo &From,
735
1.26k
        TemplateArgumentListInfo &Result) {
736
1.26k
  return ImportTemplateArgumentListInfo(
737
1.26k
      From.LAngleLoc, From.RAngleLoc, From.arguments(), Result);
738
1.26k
}
739
740
Expected<ASTNodeImporter::FunctionTemplateAndArgsTy>
741
ASTNodeImporter::ImportFunctionTemplateWithTemplateArgsFromSpecialization(
742
12.3k
    FunctionDecl *FromFD) {
743
12.3k
  assert(FromFD->getTemplatedKind() ==
744
12.3k
      FunctionDecl::TK_FunctionTemplateSpecialization);
745
746
0
  FunctionTemplateAndArgsTy Result;
747
748
12.3k
  auto *FTSInfo = FromFD->getTemplateSpecializationInfo();
749
12.3k
  if (Error Err = importInto(std::get<0>(Result), FTSInfo->getTemplate()))
750
0
    return std::move(Err);
751
752
  // Import template arguments.
753
12.3k
  auto TemplArgs = FTSInfo->TemplateArguments->asArray();
754
12.3k
  if (Error Err = ImportTemplateArguments(TemplArgs.data(), TemplArgs.size(),
755
12.3k
      std::get<1>(Result)))
756
0
    return std::move(Err);
757
758
12.3k
  return Result;
759
12.3k
}
760
761
template <>
762
Expected<TemplateParameterList *>
763
267k
ASTNodeImporter::import(TemplateParameterList *From) {
764
267k
  SmallVector<NamedDecl *, 4> To(From->size());
765
267k
  if (Error Err = ImportContainerChecked(*From, To))
766
0
    return std::move(Err);
767
768
267k
  ExpectedExpr ToRequiresClause = import(From->getRequiresClause());
769
267k
  if (!ToRequiresClause)
770
0
    return ToRequiresClause.takeError();
771
772
267k
  auto ToTemplateLocOrErr = import(From->getTemplateLoc());
773
267k
  if (!ToTemplateLocOrErr)
774
0
    return ToTemplateLocOrErr.takeError();
775
267k
  auto ToLAngleLocOrErr = import(From->getLAngleLoc());
776
267k
  if (!ToLAngleLocOrErr)
777
0
    return ToLAngleLocOrErr.takeError();
778
267k
  auto ToRAngleLocOrErr = import(From->getRAngleLoc());
779
267k
  if (!ToRAngleLocOrErr)
780
0
    return ToRAngleLocOrErr.takeError();
781
782
267k
  return TemplateParameterList::Create(
783
267k
      Importer.getToContext(),
784
267k
      *ToTemplateLocOrErr,
785
267k
      *ToLAngleLocOrErr,
786
267k
      To,
787
267k
      *ToRAngleLocOrErr,
788
267k
      *ToRequiresClause);
789
267k
}
790
791
template <>
792
Expected<TemplateArgument>
793
1.09M
ASTNodeImporter::import(const TemplateArgument &From) {
794
1.09M
  switch (From.getKind()) {
795
0
  case TemplateArgument::Null:
796
0
    return TemplateArgument();
797
798
887k
  case TemplateArgument::Type: {
799
887k
    ExpectedType ToTypeOrErr = import(From.getAsType());
800
887k
    if (!ToTypeOrErr)
801
0
      return ToTypeOrErr.takeError();
802
887k
    return TemplateArgument(*ToTypeOrErr);
803
887k
  }
804
805
36.0k
  case TemplateArgument::Integral: {
806
36.0k
    ExpectedType ToTypeOrErr = import(From.getIntegralType());
807
36.0k
    if (!ToTypeOrErr)
808
0
      return ToTypeOrErr.takeError();
809
36.0k
    return TemplateArgument(From, *ToTypeOrErr);
810
36.0k
  }
811
812
0
  case TemplateArgument::Declaration: {
813
0
    Expected<ValueDecl *> ToOrErr = import(From.getAsDecl());
814
0
    if (!ToOrErr)
815
0
      return ToOrErr.takeError();
816
0
    ExpectedType ToTypeOrErr = import(From.getParamTypeForDecl());
817
0
    if (!ToTypeOrErr)
818
0
      return ToTypeOrErr.takeError();
819
0
    return TemplateArgument(*ToOrErr, *ToTypeOrErr);
820
0
  }
821
822
54
  case TemplateArgument::NullPtr: {
823
54
    ExpectedType ToTypeOrErr = import(From.getNullPtrType());
824
54
    if (!ToTypeOrErr)
825
0
      return ToTypeOrErr.takeError();
826
54
    return TemplateArgument(*ToTypeOrErr, /*isNullPtr*/true);
827
54
  }
828
829
2.53k
  case TemplateArgument::Template: {
830
2.53k
    Expected<TemplateName> ToTemplateOrErr = import(From.getAsTemplate());
831
2.53k
    if (!ToTemplateOrErr)
832
0
      return ToTemplateOrErr.takeError();
833
834
2.53k
    return TemplateArgument(*ToTemplateOrErr);
835
2.53k
  }
836
837
0
  case TemplateArgument::TemplateExpansion: {
838
0
    Expected<TemplateName> ToTemplateOrErr =
839
0
        import(From.getAsTemplateOrTemplatePattern());
840
0
    if (!ToTemplateOrErr)
841
0
      return ToTemplateOrErr.takeError();
842
843
0
    return TemplateArgument(
844
0
        *ToTemplateOrErr, From.getNumTemplateExpansions());
845
0
  }
846
847
160k
  case TemplateArgument::Expression:
848
160k
    if (ExpectedExpr ToExpr = import(From.getAsExpr()))
849
160k
      return TemplateArgument(*ToExpr);
850
0
    else
851
0
      return ToExpr.takeError();
852
853
10.7k
  case TemplateArgument::Pack: {
854
10.7k
    SmallVector<TemplateArgument, 2> ToPack;
855
10.7k
    ToPack.reserve(From.pack_size());
856
10.7k
    if (Error Err = ImportTemplateArguments(
857
10.7k
        From.pack_begin(), From.pack_size(), ToPack))
858
0
      return std::move(Err);
859
860
10.7k
    return TemplateArgument(
861
10.7k
        llvm::makeArrayRef(ToPack).copy(Importer.getToContext()));
862
10.7k
  }
863
1.09M
  }
864
865
0
  llvm_unreachable("Invalid template argument kind");
866
0
}
867
868
template <>
869
Expected<TemplateArgumentLoc>
870
44.1k
ASTNodeImporter::import(const TemplateArgumentLoc &TALoc) {
871
44.1k
  Expected<TemplateArgument> ArgOrErr = import(TALoc.getArgument());
872
44.1k
  if (!ArgOrErr)
873
0
    return ArgOrErr.takeError();
874
44.1k
  TemplateArgument Arg = *ArgOrErr;
875
876
44.1k
  TemplateArgumentLocInfo FromInfo = TALoc.getLocInfo();
877
878
44.1k
  TemplateArgumentLocInfo ToInfo;
879
44.1k
  if (Arg.getKind() == TemplateArgument::Expression) {
880
5.86k
    ExpectedExpr E = import(FromInfo.getAsExpr());
881
5.86k
    if (!E)
882
0
      return E.takeError();
883
5.86k
    ToInfo = TemplateArgumentLocInfo(*E);
884
38.2k
  } else if (Arg.getKind() == TemplateArgument::Type) {
885
37.0k
    if (auto TSIOrErr = import(FromInfo.getAsTypeSourceInfo()))
886
37.0k
      ToInfo = TemplateArgumentLocInfo(*TSIOrErr);
887
0
    else
888
0
      return TSIOrErr.takeError();
889
37.0k
  } else {
890
1.20k
    auto ToTemplateQualifierLocOrErr =
891
1.20k
        import(FromInfo.getTemplateQualifierLoc());
892
1.20k
    if (!ToTemplateQualifierLocOrErr)
893
0
      return ToTemplateQualifierLocOrErr.takeError();
894
1.20k
    auto ToTemplateNameLocOrErr = import(FromInfo.getTemplateNameLoc());
895
1.20k
    if (!ToTemplateNameLocOrErr)
896
0
      return ToTemplateNameLocOrErr.takeError();
897
1.20k
    auto ToTemplateEllipsisLocOrErr =
898
1.20k
        import(FromInfo.getTemplateEllipsisLoc());
899
1.20k
    if (!ToTemplateEllipsisLocOrErr)
900
0
      return ToTemplateEllipsisLocOrErr.takeError();
901
1.20k
    ToInfo = TemplateArgumentLocInfo(
902
1.20k
        Importer.getToContext(), *ToTemplateQualifierLocOrErr,
903
1.20k
        *ToTemplateNameLocOrErr, *ToTemplateEllipsisLocOrErr);
904
1.20k
  }
905
906
44.1k
  return TemplateArgumentLoc(Arg, ToInfo);
907
44.1k
}
908
909
template <>
910
107k
Expected<DeclGroupRef> ASTNodeImporter::import(const DeclGroupRef &DG) {
911
107k
  if (DG.isNull())
912
0
    return DeclGroupRef::Create(Importer.getToContext(), nullptr, 0);
913
107k
  size_t NumDecls = DG.end() - DG.begin();
914
107k
  SmallVector<Decl *, 1> ToDecls;
915
107k
  ToDecls.reserve(NumDecls);
916
108k
  for (Decl *FromD : DG) {
917
108k
    if (auto ToDOrErr = import(FromD))
918
108k
      ToDecls.push_back(*ToDOrErr);
919
0
    else
920
0
      return ToDOrErr.takeError();
921
108k
  }
922
107k
  return DeclGroupRef::Create(Importer.getToContext(),
923
107k
                              ToDecls.begin(),
924
107k
                              NumDecls);
925
107k
}
926
927
template <>
928
Expected<ASTNodeImporter::Designator>
929
73
ASTNodeImporter::import(const Designator &D) {
930
73
  if (D.isFieldDesignator()) {
931
47
    IdentifierInfo *ToFieldName = Importer.Import(D.getFieldName());
932
933
47
    ExpectedSLoc ToDotLocOrErr = import(D.getDotLoc());
934
47
    if (!ToDotLocOrErr)
935
0
      return ToDotLocOrErr.takeError();
936
937
47
    ExpectedSLoc ToFieldLocOrErr = import(D.getFieldLoc());
938
47
    if (!ToFieldLocOrErr)
939
0
      return ToFieldLocOrErr.takeError();
940
941
47
    return Designator(ToFieldName, *ToDotLocOrErr, *ToFieldLocOrErr);
942
47
  }
943
944
26
  ExpectedSLoc ToLBracketLocOrErr = import(D.getLBracketLoc());
945
26
  if (!ToLBracketLocOrErr)
946
0
    return ToLBracketLocOrErr.takeError();
947
948
26
  ExpectedSLoc ToRBracketLocOrErr = import(D.getRBracketLoc());
949
26
  if (!ToRBracketLocOrErr)
950
0
    return ToRBracketLocOrErr.takeError();
951
952
26
  if (D.isArrayDesignator())
953
26
    return Designator(D.getFirstExprIndex(),
954
26
                      *ToLBracketLocOrErr, *ToRBracketLocOrErr);
955
956
0
  ExpectedSLoc ToEllipsisLocOrErr = import(D.getEllipsisLoc());
957
0
  if (!ToEllipsisLocOrErr)
958
0
    return ToEllipsisLocOrErr.takeError();
959
960
0
  assert(D.isArrayRangeDesignator());
961
0
  return Designator(
962
0
      D.getFirstExprIndex(), *ToLBracketLocOrErr, *ToEllipsisLocOrErr,
963
0
      *ToRBracketLocOrErr);
964
0
}
965
966
template <>
967
26
Expected<LambdaCapture> ASTNodeImporter::import(const LambdaCapture &From) {
968
26
  VarDecl *Var = nullptr;
969
26
  if (From.capturesVariable()) {
970
21
    if (auto VarOrErr = import(From.getCapturedVar()))
971
21
      Var = *VarOrErr;
972
0
    else
973
0
      return VarOrErr.takeError();
974
21
  }
975
976
26
  auto LocationOrErr = import(From.getLocation());
977
26
  if (!LocationOrErr)
978
0
    return LocationOrErr.takeError();
979
980
26
  SourceLocation EllipsisLoc;
981
26
  if (From.isPackExpansion())
982
0
    if (Error Err = importInto(EllipsisLoc, From.getEllipsisLoc()))
983
0
      return std::move(Err);
984
985
26
  return LambdaCapture(
986
26
      *LocationOrErr, From.isImplicit(), From.getCaptureKind(), Var,
987
26
      EllipsisLoc);
988
26
}
989
990
template <typename T>
991
1.94M
bool ASTNodeImporter::hasSameVisibilityContextAndLinkage(T *Found, T *From) {
992
1.94M
  if (Found->getLinkageInternal() != From->getLinkageInternal())
993
472
    return false;
994
995
1.94M
  if (From->hasExternalFormalLinkage())
996
1.94M
    return Found->hasExternalFormalLinkage();
997
616
  if (Importer.GetFromTU(Found) != From->getTranslationUnitDecl())
998
181
    return false;
999
435
  if (From->isInAnonymousNamespace())
1000
58
    return Found->isInAnonymousNamespace();
1001
377
  else
1002
377
    return !Found->isInAnonymousNamespace() &&
1003
377
           !Found->hasExternalFormalLinkage();
1004
435
}
bool clang::ASTNodeImporter::hasSameVisibilityContextAndLinkage<clang::EnumDecl>(clang::EnumDecl*, clang::EnumDecl*)
Line
Count
Source
991
139
bool ASTNodeImporter::hasSameVisibilityContextAndLinkage(T *Found, T *From) {
992
139
  if (Found->getLinkageInternal() != From->getLinkageInternal())
993
0
    return false;
994
995
139
  if (From->hasExternalFormalLinkage())
996
119
    return Found->hasExternalFormalLinkage();
997
20
  if (Importer.GetFromTU(Found) != From->getTranslationUnitDecl())
998
16
    return false;
999
4
  if (From->isInAnonymousNamespace())
1000
4
    return Found->isInAnonymousNamespace();
1001
0
  else
1002
0
    return !Found->isInAnonymousNamespace() &&
1003
0
           !Found->hasExternalFormalLinkage();
1004
4
}
bool clang::ASTNodeImporter::hasSameVisibilityContextAndLinkage<clang::RecordDecl>(clang::RecordDecl*, clang::RecordDecl*)
Line
Count
Source
991
4.39k
bool ASTNodeImporter::hasSameVisibilityContextAndLinkage(T *Found, T *From) {
992
4.39k
  if (Found->getLinkageInternal() != From->getLinkageInternal())
993
0
    return false;
994
995
4.39k
  if (From->hasExternalFormalLinkage())
996
4.36k
    return Found->hasExternalFormalLinkage();
997
25
  if (Importer.GetFromTU(Found) != From->getTranslationUnitDecl())
998
17
    return false;
999
8
  if (From->isInAnonymousNamespace())
1000
8
    return Found->isInAnonymousNamespace();
1001
0
  else
1002
0
    return !Found->isInAnonymousNamespace() &&
1003
0
           !Found->hasExternalFormalLinkage();
1004
8
}
bool clang::ASTNodeImporter::hasSameVisibilityContextAndLinkage<clang::FunctionDecl>(clang::FunctionDecl*, clang::FunctionDecl*)
Line
Count
Source
991
629k
bool ASTNodeImporter::hasSameVisibilityContextAndLinkage(T *Found, T *From) {
992
629k
  if (Found->getLinkageInternal() != From->getLinkageInternal())
993
136
    return false;
994
995
629k
  if (From->hasExternalFormalLinkage())
996
628k
    return Found->hasExternalFormalLinkage();
997
293
  if (Importer.GetFromTU(Found) != From->getTranslationUnitDecl())
998
36
    return false;
999
257
  if (From->isInAnonymousNamespace())
1000
8
    return Found->isInAnonymousNamespace();
1001
249
  else
1002
249
    return !Found->isInAnonymousNamespace() &&
1003
249
           !Found->hasExternalFormalLinkage();
1004
257
}
bool clang::ASTNodeImporter::hasSameVisibilityContextAndLinkage<clang::VarDecl>(clang::VarDecl*, clang::VarDecl*)
Line
Count
Source
991
4.52k
bool ASTNodeImporter::hasSameVisibilityContextAndLinkage(T *Found, T *From) {
992
4.52k
  if (Found->getLinkageInternal() != From->getLinkageInternal())
993
64
    return false;
994
995
4.46k
  if (From->hasExternalFormalLinkage())
996
4.37k
    return Found->hasExternalFormalLinkage();
997
84
  if (Importer.GetFromTU(Found) != From->getTranslationUnitDecl())
998
64
    return false;
999
20
  if (From->isInAnonymousNamespace())
1000
16
    return Found->isInAnonymousNamespace();
1001
4
  else
1002
4
    return !Found->isInAnonymousNamespace() &&
1003
4
           !Found->hasExternalFormalLinkage();
1004
20
}
bool clang::ASTNodeImporter::hasSameVisibilityContextAndLinkage<clang::ClassTemplateDecl>(clang::ClassTemplateDecl*, clang::ClassTemplateDecl*)
Line
Count
Source
991
64.8k
bool ASTNodeImporter::hasSameVisibilityContextAndLinkage(T *Found, T *From) {
992
64.8k
  if (Found->getLinkageInternal() != From->getLinkageInternal())
993
0
    return false;
994
995
64.8k
  if (From->hasExternalFormalLinkage())
996
64.7k
    return Found->hasExternalFormalLinkage();
997
30
  if (Importer.GetFromTU(Found) != From->getTranslationUnitDecl())
998
16
    return false;
999
14
  if (From->isInAnonymousNamespace())
1000
14
    return Found->isInAnonymousNamespace();
1001
0
  else
1002
0
    return !Found->isInAnonymousNamespace() &&
1003
0
           !Found->hasExternalFormalLinkage();
1004
14
}
bool clang::ASTNodeImporter::hasSameVisibilityContextAndLinkage<clang::FunctionTemplateDecl>(clang::FunctionTemplateDecl*, clang::FunctionTemplateDecl*)
Line
Count
Source
991
1.24M
bool ASTNodeImporter::hasSameVisibilityContextAndLinkage(T *Found, T *From) {
992
1.24M
  if (Found->getLinkageInternal() != From->getLinkageInternal())
993
272
    return false;
994
995
1.24M
  if (From->hasExternalFormalLinkage())
996
1.24M
    return Found->hasExternalFormalLinkage();
997
164
  if (Importer.GetFromTU(Found) != From->getTranslationUnitDecl())
998
32
    return false;
999
132
  if (From->isInAnonymousNamespace())
1000
8
    return Found->isInAnonymousNamespace();
1001
124
  else
1002
124
    return !Found->isInAnonymousNamespace() &&
1003
124
           !Found->hasExternalFormalLinkage();
1004
132
}
1005
1006
template <>
1007
bool ASTNodeImporter::hasSameVisibilityContextAndLinkage(TypedefNameDecl *Found,
1008
19.9k
                                               TypedefNameDecl *From) {
1009
19.9k
  if (Found->getLinkageInternal() != From->getLinkageInternal())
1010
0
    return false;
1011
1012
19.9k
  if (From->isInAnonymousNamespace() && 
Found->isInAnonymousNamespace()0
)
1013
0
    return Importer.GetFromTU(Found) == From->getTranslationUnitDecl();
1014
19.9k
  return From->isInAnonymousNamespace() == Found->isInAnonymousNamespace();
1015
19.9k
}
1016
1017
} // namespace clang
1018
1019
//----------------------------------------------------------------------------
1020
// Import Types
1021
//----------------------------------------------------------------------------
1022
1023
using namespace clang;
1024
1025
327
ExpectedType ASTNodeImporter::VisitType(const Type *T) {
1026
327
  Importer.FromDiag(SourceLocation(), diag::err_unsupported_ast_node)
1027
327
    << T->getTypeClassName();
1028
327
  return make_error<ImportError>(ImportError::UnsupportedConstruct);
1029
327
}
1030
1031
64
ExpectedType ASTNodeImporter::VisitAtomicType(const AtomicType *T){
1032
64
  ExpectedType UnderlyingTypeOrErr = import(T->getValueType());
1033
64
  if (!UnderlyingTypeOrErr)
1034
0
    return UnderlyingTypeOrErr.takeError();
1035
1036
64
  return Importer.getToContext().getAtomicType(*UnderlyingTypeOrErr);
1037
64
}
1038
1039
33.7k
ExpectedType ASTNodeImporter::VisitBuiltinType(const BuiltinType *T) {
1040
33.7k
  switch (T->getKind()) {
1041
0
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
1042
0
  case BuiltinType::Id: \
1043
0
    return Importer.getToContext().SingletonId;
1044
0
#include "clang/Basic/OpenCLImageTypes.def"
1045
0
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \
1046
0
  case BuiltinType::Id: \
1047
0
    return Importer.getToContext().Id##Ty;
1048
0
#include "clang/Basic/OpenCLExtensionTypes.def"
1049
0
#define SVE_TYPE(Name, Id, SingletonId) \
1050
13
  case BuiltinType::Id: \
1051
13
    return Importer.getToContext().SingletonId;
1052
0
#include "clang/Basic/AArch64SVEACLETypes.def"
1053
0
#define PPC_VECTOR_TYPE(Name, Id, Size) \
1054
0
  case BuiltinType::Id: \
1055
0
    return Importer.getToContext().Id##Ty;
1056
1
#include "clang/Basic/PPCTypes.def"
1057
0
#define RVV_TYPE(Name, Id, SingletonId)                                        \
1058
0
  case BuiltinType::Id:                                                        \
1059
0
    return Importer.getToContext().SingletonId;
1060
0
#include "clang/Basic/RISCVVTypes.def"
1061
0
#define SHARED_SINGLETON_TYPE(Expansion)
1062
0
#define BUILTIN_TYPE(Id, SingletonId) \
1063
31.2k
  case BuiltinType::Id: return Importer.getToContext().SingletonId;
1064
0
#include "clang/AST/BuiltinTypes.def"
1065
1066
  // FIXME: for Char16, Char32, and NullPtr, make sure that the "to"
1067
  // context supports C++.
1068
1069
  // FIXME: for ObjCId, ObjCClass, and ObjCSel, make sure that the "to"
1070
  // context supports ObjC.
1071
1072
0
  case BuiltinType::Char_U:
1073
    // The context we're importing from has an unsigned 'char'. If we're
1074
    // importing into a context with a signed 'char', translate to
1075
    // 'unsigned char' instead.
1076
0
    if (Importer.getToContext().getLangOpts().CharIsSigned)
1077
0
      return Importer.getToContext().UnsignedCharTy;
1078
1079
0
    return Importer.getToContext().CharTy;
1080
1081
2.48k
  case BuiltinType::Char_S:
1082
    // The context we're importing from has an unsigned 'char'. If we're
1083
    // importing into a context with a signed 'char', translate to
1084
    // 'unsigned char' instead.
1085
2.48k
    if (!Importer.getToContext().getLangOpts().CharIsSigned)
1086
0
      return Importer.getToContext().SignedCharTy;
1087
1088
2.48k
    return Importer.getToContext().CharTy;
1089
1090
57
  case BuiltinType::WChar_S:
1091
57
  case BuiltinType::WChar_U:
1092
    // FIXME: If not in C++, shall we translate to the C equivalent of
1093
    // wchar_t?
1094
57
    return Importer.getToContext().WCharTy;
1095
33.7k
  }
1096
1097
0
  llvm_unreachable("Invalid BuiltinType Kind!");
1098
0
}
1099
1100
35
ExpectedType ASTNodeImporter::VisitDecayedType(const DecayedType *T) {
1101
35
  ExpectedType ToOriginalTypeOrErr = import(T->getOriginalType());
1102
35
  if (!ToOriginalTypeOrErr)
1103
29
    return ToOriginalTypeOrErr.takeError();
1104
1105
6
  return Importer.getToContext().getDecayedType(*ToOriginalTypeOrErr);
1106
35
}
1107
1108
26
ExpectedType ASTNodeImporter::VisitComplexType(const ComplexType *T) {
1109
26
  ExpectedType ToElementTypeOrErr = import(T->getElementType());
1110
26
  if (!ToElementTypeOrErr)
1111
0
    return ToElementTypeOrErr.takeError();
1112
1113
26
  return Importer.getToContext().getComplexType(*ToElementTypeOrErr);
1114
26
}
1115
1116
81.8k
ExpectedType ASTNodeImporter::VisitPointerType(const PointerType *T) {
1117
81.8k
  ExpectedType ToPointeeTypeOrErr = import(T->getPointeeType());
1118
81.8k
  if (!ToPointeeTypeOrErr)
1119
29
    return ToPointeeTypeOrErr.takeError();
1120
1121
81.8k
  return Importer.getToContext().getPointerType(*ToPointeeTypeOrErr);
1122
81.8k
}
1123
1124
37
ExpectedType ASTNodeImporter::VisitBlockPointerType(const BlockPointerType *T) {
1125
  // FIXME: Check for blocks support in "to" context.
1126
37
  ExpectedType ToPointeeTypeOrErr = import(T->getPointeeType());
1127
37
  if (!ToPointeeTypeOrErr)
1128
0
    return ToPointeeTypeOrErr.takeError();
1129
1130
37
  return Importer.getToContext().getBlockPointerType(*ToPointeeTypeOrErr);
1131
37
}
1132
1133
ExpectedType
1134
156k
ASTNodeImporter::VisitLValueReferenceType(const LValueReferenceType *T) {
1135
  // FIXME: Check for C++ support in "to" context.
1136
156k
  ExpectedType ToPointeeTypeOrErr = import(T->getPointeeTypeAsWritten());
1137
156k
  if (!ToPointeeTypeOrErr)
1138
0
    return ToPointeeTypeOrErr.takeError();
1139
1140
156k
  return Importer.getToContext().getLValueReferenceType(*ToPointeeTypeOrErr);
1141
156k
}
1142
1143
ExpectedType
1144
34.9k
ASTNodeImporter::VisitRValueReferenceType(const RValueReferenceType *T) {
1145
  // FIXME: Check for C++0x support in "to" context.
1146
34.9k
  ExpectedType ToPointeeTypeOrErr = import(T->getPointeeTypeAsWritten());
1147
34.9k
  if (!ToPointeeTypeOrErr)
1148
0
    return ToPointeeTypeOrErr.takeError();
1149
1150
34.9k
  return Importer.getToContext().getRValueReferenceType(*ToPointeeTypeOrErr);
1151
34.9k
}
1152
1153
ExpectedType
1154
2
ASTNodeImporter::VisitMemberPointerType(const MemberPointerType *T) {
1155
  // FIXME: Check for C++ support in "to" context.
1156
2
  ExpectedType ToPointeeTypeOrErr = import(T->getPointeeType());
1157
2
  if (!ToPointeeTypeOrErr)
1158
0
    return ToPointeeTypeOrErr.takeError();
1159
1160
2
  ExpectedTypePtr ClassTypeOrErr = import(T->getClass());
1161
2
  if (!ClassTypeOrErr)
1162
0
    return ClassTypeOrErr.takeError();
1163
1164
2
  return Importer.getToContext().getMemberPointerType(*ToPointeeTypeOrErr,
1165
2
                                                      *ClassTypeOrErr);
1166
2
}
1167
1168
ExpectedType
1169
6.86k
ASTNodeImporter::VisitConstantArrayType(const ConstantArrayType *T) {
1170
6.86k
  Error Err = Error::success();
1171
6.86k
  auto ToElementType = importChecked(Err, T->getElementType());
1172
6.86k
  auto ToSizeExpr = importChecked(Err, T->getSizeExpr());
1173
6.86k
  if (Err)
1174
0
    return std::move(Err);
1175
1176
6.86k
  return Importer.getToContext().getConstantArrayType(
1177
6.86k
      ToElementType, T->getSize(), ToSizeExpr, T->getSizeModifier(),
1178
6.86k
      T->getIndexTypeCVRQualifiers());
1179
6.86k
}
1180
1181
ExpectedType
1182
274
ASTNodeImporter::VisitIncompleteArrayType(const IncompleteArrayType *T) {
1183
274
  ExpectedType ToElementTypeOrErr = import(T->getElementType());
1184
274
  if (!ToElementTypeOrErr)
1185
29
    return ToElementTypeOrErr.takeError();
1186
1187
245
  return Importer.getToContext().getIncompleteArrayType(*ToElementTypeOrErr,
1188
245
                                                        T->getSizeModifier(),
1189
245
                                                T->getIndexTypeCVRQualifiers());
1190
274
}
1191
1192
ExpectedType
1193
4
ASTNodeImporter::VisitVariableArrayType(const VariableArrayType *T) {
1194
4
  Error Err = Error::success();
1195
4
  QualType ToElementType = importChecked(Err, T->getElementType());
1196
4
  Expr *ToSizeExpr = importChecked(Err, T->getSizeExpr());
1197
4
  SourceRange ToBracketsRange = importChecked(Err, T->getBracketsRange());
1198
4
  if (Err)
1199
0
    return std::move(Err);
1200
4
  return Importer.getToContext().getVariableArrayType(
1201
4
      ToElementType, ToSizeExpr, T->getSizeModifier(),
1202
4
      T->getIndexTypeCVRQualifiers(), ToBracketsRange);
1203
4
}
1204
1205
ExpectedType ASTNodeImporter::VisitDependentSizedArrayType(
1206
963
    const DependentSizedArrayType *T) {
1207
963
  Error Err = Error::success();
1208
963
  QualType ToElementType = importChecked(Err, T->getElementType());
1209
963
  Expr *ToSizeExpr = importChecked(Err, T->getSizeExpr());
1210
963
  SourceRange ToBracketsRange = importChecked(Err, T->getBracketsRange());
1211
963
  if (Err)
1212
0
    return std::move(Err);
1213
  // SizeExpr may be null if size is not specified directly.
1214
  // For example, 'int a[]'.
1215
1216
963
  return Importer.getToContext().getDependentSizedArrayType(
1217
963
      ToElementType, ToSizeExpr, T->getSizeModifier(),
1218
963
      T->getIndexTypeCVRQualifiers(), ToBracketsRange);
1219
963
}
1220
1221
4
ExpectedType ASTNodeImporter::VisitVectorType(const VectorType *T) {
1222
4
  ExpectedType ToElementTypeOrErr = import(T->getElementType());
1223
4
  if (!ToElementTypeOrErr)
1224
0
    return ToElementTypeOrErr.takeError();
1225
1226
4
  return Importer.getToContext().getVectorType(*ToElementTypeOrErr,
1227
4
                                               T->getNumElements(),
1228
4
                                               T->getVectorKind());
1229
4
}
1230
1231
14
ExpectedType ASTNodeImporter::VisitExtVectorType(const ExtVectorType *T) {
1232
14
  ExpectedType ToElementTypeOrErr = import(T->getElementType());
1233
14
  if (!ToElementTypeOrErr)
1234
0
    return ToElementTypeOrErr.takeError();
1235
1236
14
  return Importer.getToContext().getExtVectorType(*ToElementTypeOrErr,
1237
14
                                                  T->getNumElements());
1238
14
}
1239
1240
ExpectedType
1241
92
ASTNodeImporter::VisitFunctionNoProtoType(const FunctionNoProtoType *T) {
1242
  // FIXME: What happens if we're importing a function without a prototype
1243
  // into C++? Should we make it variadic?
1244
92
  ExpectedType ToReturnTypeOrErr = import(T->getReturnType());
1245
92
  if (!ToReturnTypeOrErr)
1246
0
    return ToReturnTypeOrErr.takeError();
1247
1248
92
  return Importer.getToContext().getFunctionNoProtoType(*ToReturnTypeOrErr,
1249
92
                                                        T->getExtInfo());
1250
92
}
1251
1252
ExpectedType
1253
435k
ASTNodeImporter::VisitFunctionProtoType(const FunctionProtoType *T) {
1254
435k
  ExpectedType ToReturnTypeOrErr = import(T->getReturnType());
1255
435k
  if (!ToReturnTypeOrErr)
1256
0
    return ToReturnTypeOrErr.takeError();
1257
1258
  // Import argument types
1259
435k
  SmallVector<QualType, 4> ArgTypes;
1260
572k
  for (const auto &A : T->param_types()) {
1261
572k
    ExpectedType TyOrErr = import(A);
1262
572k
    if (!TyOrErr)
1263
13
      return TyOrErr.takeError();
1264
572k
    ArgTypes.push_back(*TyOrErr);
1265
572k
  }
1266
1267
  // Import exception types
1268
435k
  SmallVector<QualType, 4> ExceptionTypes;
1269
435k
  for (const auto &E : T->exceptions()) {
1270
0
    ExpectedType TyOrErr = import(E);
1271
0
    if (!TyOrErr)
1272
0
      return TyOrErr.takeError();
1273
0
    ExceptionTypes.push_back(*TyOrErr);
1274
0
  }
1275
1276
435k
  FunctionProtoType::ExtProtoInfo FromEPI = T->getExtProtoInfo();
1277
435k
  Error Err = Error::success();
1278
435k
  FunctionProtoType::ExtProtoInfo ToEPI;
1279
435k
  ToEPI.ExtInfo = FromEPI.ExtInfo;
1280
435k
  ToEPI.Variadic = FromEPI.Variadic;
1281
435k
  ToEPI.HasTrailingReturn = FromEPI.HasTrailingReturn;
1282
435k
  ToEPI.TypeQuals = FromEPI.TypeQuals;
1283
435k
  ToEPI.RefQualifier = FromEPI.RefQualifier;
1284
435k
  ToEPI.ExceptionSpec.Type = FromEPI.ExceptionSpec.Type;
1285
435k
  ToEPI.ExceptionSpec.NoexceptExpr =
1286
435k
      importChecked(Err, FromEPI.ExceptionSpec.NoexceptExpr);
1287
435k
  ToEPI.ExceptionSpec.SourceDecl =
1288
435k
      importChecked(Err, FromEPI.ExceptionSpec.SourceDecl);
1289
435k
  ToEPI.ExceptionSpec.SourceTemplate =
1290
435k
      importChecked(Err, FromEPI.ExceptionSpec.SourceTemplate);
1291
435k
  ToEPI.ExceptionSpec.Exceptions = ExceptionTypes;
1292
1293
435k
  if (Err)
1294
0
    return std::move(Err);
1295
1296
435k
  return Importer.getToContext().getFunctionType(
1297
435k
      *ToReturnTypeOrErr, ArgTypes, ToEPI);
1298
435k
}
1299
1300
ExpectedType ASTNodeImporter::VisitUnresolvedUsingType(
1301
196
    const UnresolvedUsingType *T) {
1302
196
  Error Err = Error::success();
1303
196
  auto ToD = importChecked(Err, T->getDecl());
1304
196
  auto ToPrevD = importChecked(Err, T->getDecl()->getPreviousDecl());
1305
196
  if (Err)
1306
0
    return std::move(Err);
1307
1308
196
  return Importer.getToContext().getTypeDeclType(
1309
196
      ToD, cast_or_null<TypeDecl>(ToPrevD));
1310
196
}
1311
1312
1.21k
ExpectedType ASTNodeImporter::VisitParenType(const ParenType *T) {
1313
1.21k
  ExpectedType ToInnerTypeOrErr = import(T->getInnerType());
1314
1.21k
  if (!ToInnerTypeOrErr)
1315
0
    return ToInnerTypeOrErr.takeError();
1316
1317
1.21k
  return Importer.getToContext().getParenType(*ToInnerTypeOrErr);
1318
1.21k
}
1319
1320
168k
ExpectedType ASTNodeImporter::VisitTypedefType(const TypedefType *T) {
1321
168k
  Expected<TypedefNameDecl *> ToDeclOrErr = import(T->getDecl());
1322
168k
  if (!ToDeclOrErr)
1323
4
    return ToDeclOrErr.takeError();
1324
1325
168k
  return Importer.getToContext().getTypeDeclType(*ToDeclOrErr);
1326
168k
}
1327
1328
3
ExpectedType ASTNodeImporter::VisitTypeOfExprType(const TypeOfExprType *T) {
1329
3
  ExpectedExpr ToExprOrErr = import(T->getUnderlyingExpr());
1330
3
  if (!ToExprOrErr)
1331
0
    return ToExprOrErr.takeError();
1332
1333
3
  return Importer.getToContext().getTypeOfExprType(*ToExprOrErr);
1334
3
}
1335
1336
0
ExpectedType ASTNodeImporter::VisitTypeOfType(const TypeOfType *T) {
1337
0
  ExpectedType ToUnderlyingTypeOrErr = import(T->getUnderlyingType());
1338
0
  if (!ToUnderlyingTypeOrErr)
1339
0
    return ToUnderlyingTypeOrErr.takeError();
1340
1341
0
  return Importer.getToContext().getTypeOfType(*ToUnderlyingTypeOrErr);
1342
0
}
1343
1344
1.09k
ExpectedType ASTNodeImporter::VisitUsingType(const UsingType *T) {
1345
1.09k
  Expected<UsingShadowDecl *> FoundOrErr = import(T->getFoundDecl());
1346
1.09k
  if (!FoundOrErr)
1347
0
    return FoundOrErr.takeError();
1348
1.09k
  Expected<QualType> UnderlyingOrErr = import(T->getUnderlyingType());
1349
1.09k
  if (!UnderlyingOrErr)
1350
0
    return UnderlyingOrErr.takeError();
1351
1352
1.09k
  return Importer.getToContext().getUsingType(*FoundOrErr, *UnderlyingOrErr);
1353
1.09k
}
1354
1355
6.45k
ExpectedType ASTNodeImporter::VisitDecltypeType(const DecltypeType *T) {
1356
  // FIXME: Make sure that the "to" context supports C++0x!
1357
6.45k
  ExpectedExpr ToExprOrErr = import(T->getUnderlyingExpr());
1358
6.45k
  if (!ToExprOrErr)
1359
0
    return ToExprOrErr.takeError();
1360
1361
6.45k
  ExpectedType ToUnderlyingTypeOrErr = import(T->getUnderlyingType());
1362
6.45k
  if (!ToUnderlyingTypeOrErr)
1363
0
    return ToUnderlyingTypeOrErr.takeError();
1364
1365
6.45k
  return Importer.getToContext().getDecltypeType(
1366
6.45k
      *ToExprOrErr, *ToUnderlyingTypeOrErr);
1367
6.45k
}
1368
1369
ExpectedType
1370
126
ASTNodeImporter::VisitUnaryTransformType(const UnaryTransformType *T) {
1371
126
  ExpectedType ToBaseTypeOrErr = import(T->getBaseType());
1372
126
  if (!ToBaseTypeOrErr)
1373
0
    return ToBaseTypeOrErr.takeError();
1374
1375
126
  ExpectedType ToUnderlyingTypeOrErr = import(T->getUnderlyingType());
1376
126
  if (!ToUnderlyingTypeOrErr)
1377
0
    return ToUnderlyingTypeOrErr.takeError();
1378
1379
126
  return Importer.getToContext().getUnaryTransformType(
1380
126
      *ToBaseTypeOrErr, *ToUnderlyingTypeOrErr, T->getUTTKind());
1381
126
}
1382
1383
470
ExpectedType ASTNodeImporter::VisitAutoType(const AutoType *T) {
1384
  // FIXME: Make sure that the "to" context supports C++11!
1385
470
  ExpectedType ToDeducedTypeOrErr = import(T->getDeducedType());
1386
470
  if (!ToDeducedTypeOrErr)
1387
0
    return ToDeducedTypeOrErr.takeError();
1388
1389
470
  ExpectedDecl ToTypeConstraintConcept = import(T->getTypeConstraintConcept());
1390
470
  if (!ToTypeConstraintConcept)
1391
0
    return ToTypeConstraintConcept.takeError();
1392
1393
470
  SmallVector<TemplateArgument, 2> ToTemplateArgs;
1394
470
  ArrayRef<TemplateArgument> FromTemplateArgs = T->getTypeConstraintArguments();
1395
470
  if (Error Err = ImportTemplateArguments(FromTemplateArgs.data(),
1396
470
                                          FromTemplateArgs.size(),
1397
470
                                          ToTemplateArgs))
1398
0
    return std::move(Err);
1399
1400
470
  return Importer.getToContext().getAutoType(
1401
470
      *ToDeducedTypeOrErr, T->getKeyword(), /*IsDependent*/false,
1402
470
      /*IsPack=*/false, cast_or_null<ConceptDecl>(*ToTypeConstraintConcept),
1403
470
      ToTemplateArgs);
1404
470
}
1405
1406
ExpectedType ASTNodeImporter::VisitDeducedTemplateSpecializationType(
1407
8
    const DeducedTemplateSpecializationType *T) {
1408
  // FIXME: Make sure that the "to" context supports C++17!
1409
8
  Expected<TemplateName> ToTemplateNameOrErr = import(T->getTemplateName());
1410
8
  if (!ToTemplateNameOrErr)
1411
0
    return ToTemplateNameOrErr.takeError();
1412
8
  ExpectedType ToDeducedTypeOrErr = import(T->getDeducedType());
1413
8
  if (!ToDeducedTypeOrErr)
1414
0
    return ToDeducedTypeOrErr.takeError();
1415
1416
8
  return Importer.getToContext().getDeducedTemplateSpecializationType(
1417
8
      *ToTemplateNameOrErr, *ToDeducedTypeOrErr, T->isDependentType());
1418
8
}
1419
1420
ExpectedType ASTNodeImporter::VisitInjectedClassNameType(
1421
6.01k
    const InjectedClassNameType *T) {
1422
6.01k
  Expected<CXXRecordDecl *> ToDeclOrErr = import(T->getDecl());
1423
6.01k
  if (!ToDeclOrErr)
1424
0
    return ToDeclOrErr.takeError();
1425
1426
6.01k
  ExpectedType ToInjTypeOrErr = import(T->getInjectedSpecializationType());
1427
6.01k
  if (!ToInjTypeOrErr)
1428
0
    return ToInjTypeOrErr.takeError();
1429
1430
  // FIXME: ASTContext::getInjectedClassNameType is not suitable for AST reading
1431
  // See comments in InjectedClassNameType definition for details
1432
  // return Importer.getToContext().getInjectedClas