aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/template-class-traits.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-12-05 23:03:49 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-12-05 23:03:49 +0000
commitd013733c73507674b5db55d1686339e45c9e6edf (patch)
treee2bd0853f94732faf9586afc6d1f76261ac76c26 /test/SemaTemplate/template-class-traits.cpp
parent224c312179700095238e5fb28bd215b541bffee9 (diff)
Fix for PR5693: shift some code into SetClassDeclAttributesFromBase so that
it gets called during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90682 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/template-class-traits.cpp')
-rw-r--r--test/SemaTemplate/template-class-traits.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaTemplate/template-class-traits.cpp b/test/SemaTemplate/template-class-traits.cpp
new file mode 100644
index 0000000000..7cf2004e72
--- /dev/null
+++ b/test/SemaTemplate/template-class-traits.cpp
@@ -0,0 +1,8 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+#define T(b) (b) ? 1 : -1
+#define F(b) (b) ? -1 : 1
+
+struct HasVirt { virtual void a(); };
+template<class T> struct InheritPolymorph : HasVirt {};
+int t01[T(__is_polymorphic(InheritPolymorph<int>))];
+