summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-expr-4.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-12-23 21:06:06 +0000
committerDouglas Gregor <dgregor@apple.com>2009-12-23 21:06:06 +0000
commit721fb2b6e4059d5054428ac13fee36dfab9962ef (patch)
treef7973d0684e4470ea4891a0e6bdde5356175e11d /clang/test/SemaTemplate/instantiate-expr-4.cpp
parentb8e6dc88bb6467cb09a7707d22996d7b24d01123 (diff)
downloadbcm5719-llvm-721fb2b6e4059d5054428ac13fee36dfab9962ef.tar.gz
bcm5719-llvm-721fb2b6e4059d5054428ac13fee36dfab9962ef.zip
Diagnose the use of incomplete types in C++ typeid expressions
llvm-svn: 92045
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-expr-4.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-expr-4.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/test/SemaTemplate/instantiate-expr-4.cpp b/clang/test/SemaTemplate/instantiate-expr-4.cpp
index 99bbbf7a162..c524e958f8a 100644
--- a/clang/test/SemaTemplate/instantiate-expr-4.cpp
+++ b/clang/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>;
// ---------------------------------------------------------------------
OpenPOWER on IntegriCloud