diff options
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()) { |