summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-declref.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-27 17:30:49 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-27 17:30:49 +0000
commitb8006fafe8cb1c48d0a89b87c2a4f7e708967aed (patch)
tree57ff3290d8fcc27863d98593faa16bb0e2576700 /clang/test/SemaTemplate/instantiate-declref.cpp
parenta72a505a801f8579e40c34a6fbdf180d474fd5ac (diff)
downloadbcm5719-llvm-b8006fafe8cb1c48d0a89b87c2a4f7e708967aed.tar.gz
bcm5719-llvm-b8006fafe8cb1c48d0a89b87c2a4f7e708967aed.zip
Add some more tests for instantiation of declaration references. Also,
improve some error recovery with explicit template instantiation. llvm-svn: 72484
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-declref.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-declref.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/instantiate-declref.cpp b/clang/test/SemaTemplate/instantiate-declref.cpp
index cceaed00e69..3b6db38617b 100644
--- a/clang/test/SemaTemplate/instantiate-declref.cpp
+++ b/clang/test/SemaTemplate/instantiate-declref.cpp
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only -verify %s
namespace N {
struct Outer {
@@ -10,12 +10,22 @@ namespace N {
static enum K1 { K1Val = sizeof(T) } Kind1;
static enum { K2Val = sizeof(T)*2 } Kind2;
+ enum { K3Val = sizeof(T)*2 } Kind3;
void foo() {
K1 k1 = K1Val;
Kind1 = K1Val;
Outer::Inner::InnerTemplate<type>::VeryInner::Kind2 = K2Val;
+ Kind3 = K3Val;
}
+
+ struct UeberInner {
+ void bar() {
+ K1 k1 = K1Val;
+ Kind1 = K1Val;
+ Outer::Inner::InnerTemplate<type>::VeryInner::Kind2 = K2Val;
+ }
+ };
};
};
};
@@ -24,3 +34,4 @@ namespace N {
typedef int INT;
template struct N::Outer::Inner::InnerTemplate<INT>::VeryInner;
+template struct N::Outer::Inner::InnerTemplate<INT>::UeberInner; // expected-error{{'UeberInner' does not name a tag member}}
OpenPOWER on IntegriCloud