summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclCXX.cpp
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2018-08-01 21:02:40 +0000
committerErich Keane <erich.keane@intel.com>2018-08-01 21:02:40 +0000
commit9c66506604c7868c6e476df8410b8fcfe98ad975 (patch)
tree30e36fab08ddcc6b37240108e57ffca24d9bca47 /clang/lib/AST/DeclCXX.cpp
parent175ef5f29e0e2c01f2f876174826b0a9f3d5103f (diff)
downloadbcm5719-llvm-9c66506604c7868c6e476df8410b8fcfe98ad975.tar.gz
bcm5719-llvm-9c66506604c7868c6e476df8410b8fcfe98ad975.zip
[AST][2/4] Move the bit-fields from FunctionDecl and CXXConstructorDecl into DeclContext
This patch follows https://reviews.llvm.org/D49729 and is followed by https://reviews.llvm.org/D49733 and https://reviews.llvm.org/D49734. Move the bits from FunctionDecl and CXXConstructorDecl into DeclContext. Differential Revision: https://reviews.llvm.org/D49732 Patch By: bricci llvm-svn: 338636
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r--clang/lib/AST/DeclCXX.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index f4bffed6d5b..8fe27f1304a 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -2246,6 +2246,21 @@ SourceRange CXXCtorInitializer::getSourceRange() const {
return SourceRange(getSourceLocation(), getRParenLoc());
}
+CXXConstructorDecl::CXXConstructorDecl(
+ ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc,
+ const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo,
+ bool isExplicitSpecified, bool isInline, bool isImplicitlyDeclared,
+ bool isConstexpr, InheritedConstructor Inherited)
+ : CXXMethodDecl(CXXConstructor, C, RD, StartLoc, NameInfo, T, TInfo,
+ SC_None, isInline, isConstexpr, SourceLocation()) {
+ setNumCtorInitializers(0);
+ setInheritingConstructor(static_cast<bool>(Inherited));
+ setImplicit(isImplicitlyDeclared);
+ if (Inherited)
+ *getTrailingObjects<InheritedConstructor>() = Inherited;
+ setExplicitSpecified(isExplicitSpecified);
+}
+
void CXXConstructorDecl::anchor() {}
CXXConstructorDecl *CXXConstructorDecl::CreateDeserialized(ASTContext &C,
@@ -2255,7 +2270,7 @@ CXXConstructorDecl *CXXConstructorDecl::CreateDeserialized(ASTContext &C,
auto *Result = new (C, ID, Extra) CXXConstructorDecl(
C, nullptr, SourceLocation(), DeclarationNameInfo(), QualType(), nullptr,
false, false, false, false, InheritedConstructor());
- Result->IsInheritingConstructor = Inherited;
+ Result->setInheritingConstructor(Inherited);
return Result;
}
OpenPOWER on IntegriCloud