CXXMethodDecl::isVirtual needs to check the canonical declaration. Fixes PR4878.
llvm-svn: 81715
diff --git a/clang/test/SemaCXX/attr-deprecated.cpp b/clang/test/SemaCXX/attr-deprecated.cpp
index c1bdfcc..54f8b5b 100644
--- a/clang/test/SemaCXX/attr-deprecated.cpp
+++ b/clang/test/SemaCXX/attr-deprecated.cpp
@@ -54,3 +54,13 @@
c->C::f();
c->B::f(); // expected-warning{{'f' is deprecated}}
}
+
+struct D {
+ virtual void f() __attribute__((deprecated));
+};
+
+void D::f() { }
+
+void f(D* d) {
+ d->f();
+}