summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/class-template-decl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-12 16:00:01 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-12 16:00:01 +0000
commitce40e2ef8a53a0e1163d49b9b322b4d0baf8f395 (patch)
tree5394aff3f6039ce9358543a9e86b1048643baaba /clang/test/SemaTemplate/class-template-decl.cpp
parent4885db6f52cae121f476f0725507ea287f8b7684 (diff)
downloadbcm5719-llvm-ce40e2ef8a53a0e1163d49b9b322b4d0baf8f395.tar.gz
bcm5719-llvm-ce40e2ef8a53a0e1163d49b9b322b4d0baf8f395.zip
Fix a crash-on-invalid involving name lookup of tag names, where we
ended up finding a function template that we didn't expect. Recover more gracefully, and fix a similar issue for class templates. llvm-svn: 101040
Diffstat (limited to 'clang/test/SemaTemplate/class-template-decl.cpp')
-rw-r--r--clang/test/SemaTemplate/class-template-decl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/class-template-decl.cpp b/clang/test/SemaTemplate/class-template-decl.cpp
index 71aabe97f4e..1be1bc070a8 100644
--- a/clang/test/SemaTemplate/class-template-decl.cpp
+++ b/clang/test/SemaTemplate/class-template-decl.cpp
@@ -51,3 +51,8 @@ void f() {
}
template<typename T> class X1 { } var; // expected-error{{declared as a template}}
+
+namespace M {
+}
+
+template<typename T> class M::C3 { }; // expected-error{{out-of-line definition of 'C3' does not match any declaration in namespace 'M'}}
OpenPOWER on IntegriCloud