Implement basic support for the use of variadic templates and blocks
commit78213fd5c84729212c4bfb7bbec31c22e1ec3a75
authorDouglas Gregor <doug.gregor@gmail.com>
Wed, 19 Jan 2011 21:32:01 +0000 (19 21:32 +0000)
committerDouglas Gregor <doug.gregor@gmail.com>
Wed, 19 Jan 2011 21:32:01 +0000 (19 21:32 +0000)
tree27cf930e8bc8c5e61bce4279af3d65a4584dc66d
parent7655c583c04012a8c0f6ede9d930417a9240b99d
Implement basic support for the use of variadic templates and blocks
together. In particular:
  - Handle the use of captured parameter pack names within blocks
  (BlockDeclRefExpr understands parameter packs now)
  - Handle the declaration and expansion of parameter packs within a block's
  parameter list, e.g., ^(Args ...args) { ... })
  - Handle instantiation of blocks where the return type was not
  explicitly specified. (unrelated, but necessary for my tests).

Together, these fixes should make blocks and variadic templates work
reasonably well together. Note that BlockDeclRefExpr is still broken
w.r.t. its computation of type and value dependence, which will still
cause problems for blocks in templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123849 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Expr.h
lib/AST/Expr.cpp
lib/Sema/SemaTemplateVariadic.cpp
lib/Sema/TreeTransform.h
test/CXX/temp/temp.decls/temp.variadic/ext-blocks.cpp [new file with mode: 0644]