summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r--clang/lib/AST/DeclCXX.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index d15cfefed04..a279eda38a3 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -785,6 +785,12 @@ SourceRange CXXBaseOrMemberInitializer::getSourceRange() const {
}
CXXConstructorDecl *
+CXXConstructorDecl::Create(ASTContext &C, EmptyShell Empty) {
+ return new (C) CXXConstructorDecl(0, SourceLocation(), DeclarationName(),
+ QualType(), 0, false, false, false);
+}
+
+CXXConstructorDecl *
CXXConstructorDecl::Create(ASTContext &C, CXXRecordDecl *RD,
SourceLocation L, DeclarationName N,
QualType T, TypeSourceInfo *TInfo,
@@ -887,6 +893,12 @@ bool CXXConstructorDecl::isCopyConstructorLikeSpecialization() const {
}
CXXDestructorDecl *
+CXXDestructorDecl::Create(ASTContext &C, EmptyShell Empty) {
+ return new (C) CXXDestructorDecl(0, SourceLocation(), DeclarationName(),
+ QualType(), false, false);
+}
+
+CXXDestructorDecl *
CXXDestructorDecl::Create(ASTContext &C, CXXRecordDecl *RD,
SourceLocation L, DeclarationName N,
QualType T, bool isInline,
@@ -903,6 +915,12 @@ CXXConstructorDecl::Destroy(ASTContext& C) {
}
CXXConversionDecl *
+CXXConversionDecl::Create(ASTContext &C, EmptyShell Empty) {
+ return new (C) CXXConversionDecl(0, SourceLocation(), DeclarationName(),
+ QualType(), 0, false, false);
+}
+
+CXXConversionDecl *
CXXConversionDecl::Create(ASTContext &C, CXXRecordDecl *RD,
SourceLocation L, DeclarationName N,
QualType T, TypeSourceInfo *TInfo,
@@ -940,6 +958,12 @@ NamespaceDecl *UsingDirectiveDecl::getNominatedNamespace() {
return cast_or_null<NamespaceDecl>(NominatedNamespace);
}
+void UsingDirectiveDecl::setNominatedNamespace(NamedDecl* ND) {
+ assert((isa<NamespaceDecl>(ND) || isa<NamespaceAliasDecl>(ND)) &&
+ "expected a NamespaceDecl or NamespaceAliasDecl");
+ NominatedNamespace = ND;
+}
+
NamespaceAliasDecl *NamespaceAliasDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L,
SourceLocation AliasLoc,
OpenPOWER on IntegriCloud