Diag(Param->getLocation(), diag::err_array_star_in_function_definition);
}
}
-
- if (getLangOptions().CPlusPlus)
- if (const RecordType *RT = Param->getType()->getAs<RecordType>())
- FinalizeVarWithDestructor(Param, RT);
}
return HasInvalidParm;
namespace test3 {
class A {
private:
- ~A(); // expected-note 3 {{declared private here}}
+ ~A(); // expected-note 2 {{declared private here}}
static A foo;
};
A a; // expected-error {{variable of type 'test3::A' has private destructor}}
A A::foo;
- void foo(A param) { // expected-error {{variable of type 'test3::A' has private destructor}}
+ void foo(A param) { // okay
A local; // expected-error {{variable of type 'test3::A' has private destructor}}
}
}
};
}
+
+namespace PR6709 {
+ template<class T> class X { T v; ~X() { ++*v; } };
+ void a(X<int> x) {}
+}