diff options
author | John McCall <rjmccall@apple.com> | 2009-09-04 01:14:41 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-09-04 01:14:41 +0000 |
commit | 06f6fe8df71d2a7cd723bcfbf2bda7356904f20e (patch) | |
tree | 7fc550a091183ad2e1c6b82aae7cd5db4f404b24 /clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp | |
parent | a3438c8bc2cc146d155c431063627c6b55c0e0cd (diff) | |
download | bcm5719-llvm-06f6fe8df71d2a7cd723bcfbf2bda7356904f20e.tar.gz bcm5719-llvm-06f6fe8df71d2a7cd723bcfbf2bda7356904f20e.zip |
Correctly handle elaborated template ids. Still not handled properly for friends.
llvm-svn: 80977
Diffstat (limited to 'clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp')
-rw-r--r-- | clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp b/clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp new file mode 100644 index 00000000000..4dc1cc7d7a9 --- /dev/null +++ b/clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp @@ -0,0 +1,18 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +// elaborated-type-specifier: +// class-key '::'? nested-name-specifier? 'template'? simple-template-id +// Tests that this form is accepted by the compiler but does not follow +// the elaborated lookup rules of [basic.lookup.elab]. + +template <typename> class Ident {}; + +namespace A { + template <typename> void Ident(); + + class Ident<int> AIdent; // expected-error {{refers to a function template}} + class ::Ident<int> AnotherIdent; +} + +class Ident<int> GlobalIdent; +union Ident<int> GlobalIdent; // expected-error {{ tag type that does not match }} |