diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-09-25 00:23:05 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-09-25 00:23:05 +0000 |
commit | 54b3ba8cf2eb4886a88cdb8adedb15f43333ff1d (patch) | |
tree | 8d1d1ea9f0d6981c6c3a7e6cccae64fe5ce3010c /test/SemaTemplate/class-template-ctor-initializer.cpp | |
parent | 6319917b5021e9602389b49ca4f245d235e9b90a (diff) |
Don't produce diagnostics for missing ctor-initializers during template
instantiations if we encountered errors parsing some of the initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/class-template-ctor-initializer.cpp')
-rw-r--r-- | test/SemaTemplate/class-template-ctor-initializer.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/SemaTemplate/class-template-ctor-initializer.cpp b/test/SemaTemplate/class-template-ctor-initializer.cpp index 44bb4bda79..6043327b7b 100644 --- a/test/SemaTemplate/class-template-ctor-initializer.cpp +++ b/test/SemaTemplate/class-template-ctor-initializer.cpp @@ -53,3 +53,20 @@ namespace PR7259 { return 0; } } + +namespace NonDependentError { + struct Base { Base(int); }; // expected-note 2{{candidate}} + + template<typename T> + struct Derived1 : Base { + Derived1() : Base(1, 2) {} // expected-error {{no matching constructor}} + }; + + template<typename T> + struct Derived2 : Base { + Derived2() : BaseClass(1) {} // expected-error {{does not name a non-static data member or base}} + }; + + Derived1<void> d1; + Derived2<void> d2; +} |