================
Comment at: include/clang/AST/Stmt.h:1962
@@ +1961,3 @@
+  /// \brief The implicit outlined function.
+  FunctionDecl *TheFuncDecl;
+
----------------
Wei Pan wrote:
> Doug Gregor wrote:
> > Interesting. We're actually going to synthesize a FunctionDecl for captured 
> > statements? I would have expected that the function would be synthesized 
> > entirely in CodeGen, and would never be represented in the AST. Why do we 
> > need to represent the function in the AST?
> This FunctionDecl was synthesized during Sema and we marked this function as 
> a capturing region. With this approach, its codegen seems simpler, comparing 
> to the implementation for "CodeGenFunction::GenerateCopyHelperFunction(const 
> CGBlockInfo &blockInfo)" 
> 
> What about we first post our parsing and sema patches? If having this 
> FunctionDecl is not ideal, we would certainly like to remove it out of the 
> AST and generate it during CodeGen.   
Seemly, we do need this FunctionDecl as the DeclContext for anything inside 
this captured statement, just like Lambda::operator()() or BlockDecl. 


http://llvm-reviews.chandlerc.com/D370
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to