diff options
author | Erich Keane <erich.keane@intel.com> | 2018-08-01 21:16:54 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2018-08-01 21:16:54 +0000 |
commit | c9d2990b914ffbb63258b078c4e31d7c35f59f38 (patch) | |
tree | c397434aaf938d4c1f3678f5909ce6816a2fb224 /clang/lib/AST/Decl.cpp | |
parent | 6699fc34dd985209bb2d0a35e2e41f6f92f35940 (diff) | |
download | bcm5719-llvm-c9d2990b914ffbb63258b078c4e31d7c35f59f38.tar.gz bcm5719-llvm-c9d2990b914ffbb63258b078c4e31d7c35f59f38.zip |
[AST][3/4] Move the bit-fields from BlockDecl, LinkageSpecDecl and OMPDeclareReductionDecl into DeclContext
This patch follows https://reviews.llvm.org/D49729
and https://reviews.llvm.org/D49732, and is
followed by https://reviews.llvm.org/D49734.
Move the bits from BlockDecl, LinkageSpecDecl and
OMPDeclareReductionDecl into DeclContext.
Differential Revision: https://reviews.llvm.org/D49733
Patch By: bricci
llvm-svn: 338639
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 0edd18e3931..e38172d0119 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -4215,6 +4215,15 @@ const FieldDecl *RecordDecl::findFirstNamedDataMember() const { // BlockDecl Implementation //===----------------------------------------------------------------------===// +BlockDecl::BlockDecl(DeclContext *DC, SourceLocation CaretLoc) + : Decl(Block, DC, CaretLoc), DeclContext(Block) { + setIsVariadic(false); + setCapturesCXXThis(false); + setBlockMissingReturnType(true); + setIsConversionFromLambda(false); + setDoesNotEscape(false); +} + void BlockDecl::setParams(ArrayRef<ParmVarDecl *> NewParamInfo) { assert(!ParamInfo && "Already has param info!"); @@ -4228,7 +4237,7 @@ void BlockDecl::setParams(ArrayRef<ParmVarDecl *> NewParamInfo) { void BlockDecl::setCaptures(ASTContext &Context, ArrayRef<Capture> Captures, bool CapturesCXXThis) { - this->CapturesCXXThis = CapturesCXXThis; + this->setCapturesCXXThis(CapturesCXXThis); this->NumCaptures = Captures.size(); if (Captures.empty()) { |