Coverage Report

Created: 2021-08-24 07:12

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