diff clang/test/SemaCXX/abstract.cpp @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents 1d019706d866
children c4bab56944e8
line wrap: on
line diff
--- a/clang/test/SemaCXX/abstract.cpp	Tue Jun 15 19:13:43 2021 +0900
+++ b/clang/test/SemaCXX/abstract.cpp	Tue Jun 15 19:15:29 2021 +0900
@@ -258,7 +258,8 @@
   struct A { A(int); virtual ~A() = 0; }; // expected-note {{pure virtual method}}
   const A &a = 0; // expected-error {{abstract class}}
   void f(const A &a = 0); // expected-error {{abstract class}}
-  void g() { f(0); } // expected-error {{abstract class}}
+  void g(const A &a);
+  void h() { g(0); } // expected-error {{abstract class}}
 }
 
 // PR9247: Crash on invalid in clang::Sema::ActOnFinishCXXMemberSpecification
@@ -278,7 +279,7 @@
       virtual void f() = 0; // expected-note {{unimplemented pure virtual method 'f' in 'C'}}
   };
 
-  void foo( C& c ) {}
+  void foo(const C& c ) {}
 
   void bar( void ) {
     foo(C(99)); // expected-error {{allocating an object of abstract class type 'pr12658::C'}}