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