r256083 - Test for diagnostic quality improvement in r256049.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 18 19:12:14 PST 2015


Author: rsmith
Date: Fri Dec 18 21:12:14 2015
New Revision: 256083

URL: http://llvm.org/viewvc/llvm-project?rev=256083&view=rev
Log:
Test for diagnostic quality improvement in r256049.

Modified:
    cfe/trunk/test/SemaTemplate/class-template-decl.cpp

Modified: cfe/trunk/test/SemaTemplate/class-template-decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/class-template-decl.cpp?rev=256083&r1=256082&r2=256083&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/class-template-decl.cpp (original)
+++ cfe/trunk/test/SemaTemplate/class-template-decl.cpp Fri Dec 18 21:12:14 2015
@@ -152,3 +152,10 @@ void DontCrashOnThis() {
   T &pT = T();
   pT;
 }
+
+namespace abstract_dependent_class {
+  template<typename T> struct A {
+    virtual A<T> *clone() = 0; // expected-note {{pure virtual}}
+  };
+  template<typename T> A<T> *A<T>::clone() { return new A<T>; } // expected-error {{abstract class type 'A<T>'}}
+}




More information about the cfe-commits mailing list