diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-25 23:52:28 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-25 23:52:28 +0000 |
commit | d54dfb871882852c00e525bceef0b92fe945d40a (patch) | |
tree | ec62f11d206d20332fa810da63ed41e63d3b6b57 /clang/test/SemaTemplate/class-template-id-2.cpp | |
parent | b750d928cecf9b3c4144ac40c6c87da91a34f444 (diff) | |
download | bcm5719-llvm-d54dfb871882852c00e525bceef0b92fe945d40a.tar.gz bcm5719-llvm-d54dfb871882852c00e525bceef0b92fe945d40a.zip |
Implementing parsing of template-ids as class-names, so that we can
derive from a class template specialization, e.g.,
class B : public A<int> { };
llvm-svn: 65488
Diffstat (limited to 'clang/test/SemaTemplate/class-template-id-2.cpp')
-rw-r--r-- | clang/test/SemaTemplate/class-template-id-2.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/class-template-id-2.cpp b/clang/test/SemaTemplate/class-template-id-2.cpp new file mode 100644 index 00000000000..dee4735de9e --- /dev/null +++ b/clang/test/SemaTemplate/class-template-id-2.cpp @@ -0,0 +1,23 @@ +// RUN: clang -fsyntax-only -verify %s +namespace N { + template<typename T> class A; + + template<> class A<int> { }; + + class B : public A<int> { }; +} + +class C1 : public N::A<int> { }; + +class C2 : public N::A<float> { }; // expected-error{{base class has incomplete type}} \ + // FIXME: expected-note{{forward declaration of 'class A'}} + +struct D1 { + operator N::A<int>(); +}; + +namespace N { + struct D2 { + operator A<int>(); + }; +} |