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 | 1c69bf00ae8328bae33594cd5e84f0c61009598e (patch) | |
tree | a7a91f4e5d788e934defc4463b79cc3dc5590c2f /clang/test/SemaTemplate/class-template-ctor-initializer.cpp | |
parent | 41476410c98cf92094536ea904acc7eb14eaa3ea (diff) | |
download | bcm5719-llvm-1c69bf00ae8328bae33594cd5e84f0c61009598e.tar.gz bcm5719-llvm-1c69bf00ae8328bae33594cd5e84f0c61009598e.zip |
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.
llvm-svn: 106103
Diffstat (limited to 'clang/test/SemaTemplate/class-template-ctor-initializer.cpp')
-rw-r--r-- | clang/test/SemaTemplate/class-template-ctor-initializer.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/class-template-ctor-initializer.cpp b/clang/test/SemaTemplate/class-template-ctor-initializer.cpp index fd9417c795f..81a5e2b9c66 100644 --- a/clang/test/SemaTemplate/class-template-ctor-initializer.cpp +++ b/clang/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; + } +} |