From 422f155ca3884aa06244df8011c3f366c89c43e3 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 25 Feb 2010 18:11:54 +0000 Subject: Don't try to finalize an ill-formed variable or one whose class type is ill-formed. Fixes PR6421 llvm-svn: 97152 --- clang/test/SemaCXX/destructor.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'clang/test/SemaCXX/destructor.cpp') diff --git a/clang/test/SemaCXX/destructor.cpp b/clang/test/SemaCXX/destructor.cpp index a0c2c1e037e..ab3c809e00a 100644 --- a/clang/test/SemaCXX/destructor.cpp +++ b/clang/test/SemaCXX/destructor.cpp @@ -61,3 +61,20 @@ struct X {}; struct Y { ~X(); // expected-error {{expected the class name after '~' to name the enclosing class}} }; + +namespace PR6421 { + class T; // expected-note{{forward declaration}} + + class QGenericArgument + { + template + void foo(T t) // expected-error{{variable has incomplete type}} + { } + + void disconnect() + { + T* t; + bob(t); // expected-error{{undeclared identifier 'bob'}} + } + }; +} -- cgit v1.2.3