Lines Matching defs:decl
48 /// constructing a new ASTImporter manually to copy over a type/decl, this class
98 clang::Decl *CopyDecl(clang::ASTContext *dst_ctx, clang::Decl *decl);
109 /// Copies the given decl to the destination type system.
111 clang::Decl *DeportDecl(clang::ASTContext *dst_ctx, clang::Decl *decl);
118 /// \param decl The RecordDecl to set the layout for.
120 void SetRecordLayout(clang::RecordDecl *decl, const LayoutInfo &layout);
134 /// \param[in] record The decl whose layout we're calculating.
172 bool CompleteTagDecl(clang::TagDecl *decl);
174 bool CompleteTagDeclWithOrigin(clang::TagDecl *decl, clang::TagDecl *origin);
183 /// 'original' decl is from now on used to import additional information
184 /// into the given decl.
188 /// call this is if there is a 'better' original decl and the target decl
190 void SetDeclOrigin(const clang::Decl *decl, clang::Decl *original_decl);
192 std::optional<ClangASTMetadata> GetDeclMetadata(const clang::Decl *decl);
202 void RegisterNamespaceMap(const clang::NamespaceDecl *decl,
205 NamespaceMapSP GetNamespaceMap(const clang::NamespaceDecl *decl);
207 void BuildNamespaceMap(const clang::NamespaceDecl *decl);
244 : ctx(_ctx), decl(_decl) {
245 // The decl has to be in its associated ASTContext.
251 decl = rhs.decl;
256 decl = rhs.decl;
259 bool Valid() const { return (ctx != nullptr || decl != nullptr); }
262 clang::Decl *decl = nullptr;
269 /// A decl has been imported for the first time.
380 void setOrigin(const clang::Decl *decl, DeclOrigin origin) {
381 // Setting the origin of any decl to itself (or to a different decl
385 assert(&decl->getASTContext() != origin.ctx &&
386 "Trying to set decl origin to its own ASTContext?");
387 assert(decl != origin.decl && "Trying to set decl origin to itself?");
388 m_origins[decl] = origin;
391 /// Removes any tracked DeclOrigin for the given decl.
392 void removeOrigin(const clang::Decl *decl) { m_origins.erase(decl); }
409 DeclOrigin getOrigin(const clang::Decl *decl) const {
410 auto iter = m_origins.find(decl);
417 bool hasOrigin(const clang::Decl *decl) const {
418 return getOrigin(decl).Valid();
472 DeclOrigin GetDeclOrigin(const clang::Decl *decl);
483 TaggedASTDecl() : decl(nullptr) {}
484 TaggedASTDecl(D *_decl) : decl(_decl) {}
485 bool IsValid() const { return (decl != nullptr); }
487 D *operator->() const { return decl; }
488 D *decl;
493 return TD<D2>(llvm::dyn_cast<D2>(source.decl));
518 ClangASTImporter::DeclOrigin origin = importer.GetDeclOrigin(this->decl);
521 return DeclFromUser<D>(llvm::dyn_cast<D>(origin.decl));
527 DeclFromParser<> parser_generic_decl(importer.CopyDecl(dest_ctx, this->decl));
530 return DeclFromParser<D>(llvm::dyn_cast<D>(parser_generic_decl.decl));