summaryrefslogtreecommitdiff
path: root/clang/test/SemaTemplate/template-class-traits.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaTemplate/template-class-traits.cpp')
-rw-r--r--clang/test/SemaTemplate/template-class-traits.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/template-class-traits.cpp b/clang/test/SemaTemplate/template-class-traits.cpp
new file mode 100644
index 0000000..4710294
--- /dev/null
+++ b/clang/test/SemaTemplate/template-class-traits.cpp
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -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>))];
+