diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-22 23:47:06 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-22 23:47:06 +0000 |
commit | e30d0bdda24708e9a667722a56b9c96153fe8b4d (patch) | |
tree | 0c0edde7d5549295d351e640f84e61cb011f8591 /test/SemaTemplate/instantiate-expr-4.cpp | |
parent | 76658235f9e350eab68bfbb4e88d0be2ad48e102 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72303 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiate-expr-4.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-expr-4.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-expr-4.cpp b/test/SemaTemplate/instantiate-expr-4.cpp index d23d01bf3b..cd74a21d6d 100644 --- a/test/SemaTemplate/instantiate-expr-4.cpp +++ b/test/SemaTemplate/instantiate-expr-4.cpp @@ -276,3 +276,14 @@ struct NonDepMemberCall0 { template struct NonDepMemberCall0<int&>; template struct NonDepMemberCall0<const int&>; template struct NonDepMemberCall0<float&>; // expected-note{{instantiation}} + + +template<typename T> +struct QualifiedDeclRef0 { + T f() { + return is_pod<X>::value; // expected-error{{initialized}} + } +}; + +template struct QualifiedDeclRef0<bool>; +template struct QualifiedDeclRef0<int&>; // expected-note{{instantiation}} |