diff options
author | Matt Beaumont-Gay <matthewbg@google.com> | 2013-06-21 18:58:32 +0000 |
---|---|---|
committer | Matt Beaumont-Gay <matthewbg@google.com> | 2013-06-21 18:58:32 +0000 |
commit | 538fccb44c521f5f26e7aa4cebf6a55284e28b3d (patch) | |
tree | 12141e181fd3452a64156adefe924da6979d2a5e /test/SemaTemplate/derived.cpp | |
parent | 0ac428eb8ae01995d70a8704862aafaea7c16c53 (diff) | |
download | clang-538fccb44c521f5f26e7aa4cebf6a55284e28b3d.tar.gz |
Propagate the invalid bit from bases to derived template classes.
Fixes PR16292.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/derived.cpp')
-rw-r--r-- | test/SemaTemplate/derived.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaTemplate/derived.cpp b/test/SemaTemplate/derived.cpp index 7b91f9a3ed..a76b34fda2 100644 --- a/test/SemaTemplate/derived.cpp +++ b/test/SemaTemplate/derived.cpp @@ -28,3 +28,12 @@ namespace rdar13267210 { } }; } + +namespace PR16292 { + class IncompleteClass; // expected-note{{forward declaration}} + class BaseClass { + IncompleteClass Foo; // expected-error{{field has incomplete type}} + }; + template<class T> class DerivedClass : public BaseClass {}; + void* p = new DerivedClass<void>; +} |