diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-23 21:06:06 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-23 21:06:06 +0000 |
commit | 765ccba920269eefbf572ec4bcd6ac7b6e9f9f77 (patch) | |
tree | 6afe94d058d9f1cc9e269baabf8c832a6c185318 /test/SemaTemplate/instantiate-expr-4.cpp | |
parent | 520ad5f7bcbf66a9ef2f6b25e719cbdbcc5534f3 (diff) |
Diagnose the use of incomplete types in C++ typeid expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92045 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiate-expr-4.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-expr-4.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/SemaTemplate/instantiate-expr-4.cpp b/test/SemaTemplate/instantiate-expr-4.cpp index 99bbbf7a16..c524e958f8 100644 --- a/test/SemaTemplate/instantiate-expr-4.cpp +++ b/test/SemaTemplate/instantiate-expr-4.cpp @@ -133,7 +133,7 @@ struct Throw1 { } }; -struct Incomplete; // expected-note{{forward}} +struct Incomplete; // expected-note 2{{forward}} template struct Throw1<int>; template struct Throw1<int*>; @@ -143,7 +143,6 @@ template struct Throw1<Incomplete*>; // expected-note{{instantiation}} // typeid expressions // --------------------------------------------------------------------- -// FIXME: This should really include <typeinfo>, but we don't have that yet. namespace std { class type_info; } @@ -154,7 +153,7 @@ struct TypeId0 { if (ptr) return typeid(ptr); else - return typeid(T); + return typeid(T); // expected-error{{'typeid' of incomplete type 'struct Incomplete'}} } }; @@ -163,7 +162,7 @@ struct Abstract { }; template struct TypeId0<int>; -template struct TypeId0<Incomplete>; +template struct TypeId0<Incomplete>; // expected-note{{instantiation of member function}} template struct TypeId0<Abstract>; // --------------------------------------------------------------------- |