diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-06-16 16:03:14 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-06-16 16:03:14 +0000 |
commit | 3956b1ab303139d9e952c2c30ed16643fad0c325 (patch) | |
tree | 85fea6c8328b1e957ec43967ee6015fc59721e6b /test/SemaTemplate/class-template-ctor-initializer.cpp | |
parent | a8f031fa67ea2f0d7e3a97207f7bc6f118e5fa06 (diff) |
If a non-dependent base class initializer fails to match any direct or
virtual base class, but the class still has dependent base classes,
then don't diagnose the failed match as an error: the right base class
might magically appear. Fixes PR7259.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106103 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 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/SemaTemplate/class-template-ctor-initializer.cpp b/test/SemaTemplate/class-template-ctor-initializer.cpp index fd9417c795..81a5e2b9c6 100644 --- a/test/SemaTemplate/class-template-ctor-initializer.cpp +++ b/test/SemaTemplate/class-template-ctor-initializer.cpp @@ -31,3 +31,25 @@ struct TmplD : Tmpl<char>, TmplB<char> { TmplB<char>() {} }; +namespace PR7259 { + class Base { + public: + Base() {} + }; + + template <class ParentClass> + class Derived : public ParentClass { + public: + Derived() : Base() {} + }; + + class Final : public Derived<Base> { + }; + + int + main (void) + { + Final final(); + return 0; + } +} |