Commit Graph

11 Commits

Author SHA1 Message Date
Douglas Gregor 4a9f481db9 Template instantiation for qualified declaration reference
expressions. We are now missing template instantiation logic for only
three classes of expressions:
  - Blocks-related expressions (BlockExpr, BlockDeclRefExpr)
  - C++ default argument expressions
  - Objective-C expressions

Additionally, our handling of DeclRefExpr is still quite poor, since
it cannot handle references to many kinds of declarations.

As part of this change, converted the TemplateExprInstantiator to use
iteration through all of the expressions via clang/AST/StmtNodes.def,
ensuring that we don't forget to add template instantiation logic for
any new expression node kinds.

llvm-svn: 72303
2009-05-22 23:47:06 +00:00
Douglas Gregor efe7c393e1 Add a few tests to ensure that member functions of class templates can
call other member functions of class templates, including after
template instantiation. No functionality change.

llvm-svn: 72282
2009-05-22 21:26:58 +00:00
Douglas Gregor a8db954f24 Representation of and template instantiation for member
expressions. This change introduces another AST node,
CXXUnresolvedMemberExpr, that captures member references (x->m, x.m)
when the base of the expression (the "x") is type-dependent, and we
therefore cannot resolve the member reference yet.

Note that our parsing of member references for C++ is still quite
poor, e.g., we don't handle x->Base::m or x->operator int.

llvm-svn: 72281
2009-05-22 21:13:27 +00:00
Douglas Gregor c2607b9a08 Template instantiation for initializer lists
llvm-svn: 72229
2009-05-21 21:38:12 +00:00
Douglas Gregor 31c7e99401 Template instantiation for unary type traits, e.g., __is_pod
llvm-svn: 72220
2009-05-21 18:55:48 +00:00
Douglas Gregor aa85d8221c Template instantiation for C++ "typeid" expressions.
llvm-svn: 72218
2009-05-21 18:34:44 +00:00
Douglas Gregor 728d41bbb9 Template instantiation for C++ throw expressions
llvm-svn: 72217
2009-05-21 17:37:52 +00:00
Douglas Gregor 29fe6aeef3 Template instantiation for C++ delete expression
llvm-svn: 72216
2009-05-21 17:21:12 +00:00
Douglas Gregor d0fefbafd1 Template instantiation for C++ "new" expressions.
llvm-svn: 72199
2009-05-21 00:00:09 +00:00
Douglas Gregor 06555f134a Template instantiation for CXXExprWithTemporaries, which occurs when
temporaries are generated for some object-constructing expressions in
templates that are not type-dependent. 

Also, be sure to introduce the variable from a CXXConditionDeclExpr
into the set of instantiated local variables.

llvm-svn: 72185
2009-05-20 21:51:01 +00:00
Douglas Gregor e70f108158 Template instantiation for the various kinds of AST nodes that occur
due to C++ type construction of the form T(a1, a2, ..., aN).

llvm-svn: 72183
2009-05-20 21:38:11 +00:00