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