diff options
| author | Anders Carlsson <andersca@mac.com> | 2011-01-20 06:52:44 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2011-01-20 06:52:44 +0000 |
| commit | 7c812f5a99146b7b32953bdc7c4a40c6848f9745 (patch) | |
| tree | 85a1199f191cd17f8d0218069c842dbc3d784e88 /clang/test | |
| parent | 2d67ed8f3b18892107af2e1d1304ef2d30d6ca38 (diff) | |
| download | bcm5719-llvm-7c812f5a99146b7b32953bdc7c4a40c6848f9745.tar.gz bcm5719-llvm-7c812f5a99146b7b32953bdc7c4a40c6848f9745.zip | |
When instantiating member functions, propagate whether the member function is marked 'final' and 'override'.
Also, call CheckOverrideControl when instantiating member functions.
llvm-svn: 123900
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CXX/class.derived/class.virtual/p3-0x.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CXX/class.derived/class.virtual/p3-0x.cpp b/clang/test/CXX/class.derived/class.virtual/p3-0x.cpp index 773b9f6077f..d49d06cbddb 100644 --- a/clang/test/CXX/class.derived/class.virtual/p3-0x.cpp +++ b/clang/test/CXX/class.derived/class.virtual/p3-0x.cpp @@ -24,3 +24,19 @@ struct B : A { }; } + +namespace Test3 { + +struct A { + virtual void f(int, char, int); +}; + +template<typename... Args> +struct B : A { + virtual void f(Args...) override; // expected-error {{'f' marked 'override' but does not override any member functions}} +}; + +template struct B<int, char, int>; +template struct B<int>; // expected-note {{in instantiation of template class 'Test3::B<int>' requested here}} + +} |

