diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-25 18:11:54 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-25 18:11:54 +0000 |
commit | 422f155ca3884aa06244df8011c3f366c89c43e3 (patch) | |
tree | 5562e565f4d836ec7fb3da5d483b3baf0e704ff4 /clang/test/SemaCXX/destructor.cpp | |
parent | 68e22cb5a0526fb1f8223720a2618896bbde61c4 (diff) | |
download | bcm5719-llvm-422f155ca3884aa06244df8011c3f366c89c43e3.tar.gz bcm5719-llvm-422f155ca3884aa06244df8011c3f366c89c43e3.zip |
Don't try to finalize an ill-formed variable or one whose class type is ill-formed. Fixes PR6421
llvm-svn: 97152
Diffstat (limited to 'clang/test/SemaCXX/destructor.cpp')
-rw-r--r-- | clang/test/SemaCXX/destructor.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
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<typename U> + void foo(T t) // expected-error{{variable has incomplete type}} + { } + + void disconnect() + { + T* t; + bob<QGenericArgument>(t); // expected-error{{undeclared identifier 'bob'}} + } + }; +} |