summaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/value-dependent-exprs.cpp
diff options
context:
space:
mode:
authorZancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au>2012-09-24 09:58:17 +1000
committerZancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au>2012-09-24 09:58:17 +1000
commit222e2a7620e6520ffaf4fc4e69d79c18da31542e (patch)
tree7bfbc05bfa3b41c8f9d2e56d53a0bc3e310df239 /clang/test/SemaCXX/value-dependent-exprs.cpp
parent3d206f03985b50beacae843d880bccdc91a9f424 (diff)
Add the clang library to the repo (with some of my changes, too).
Diffstat (limited to 'clang/test/SemaCXX/value-dependent-exprs.cpp')
-rw-r--r--clang/test/SemaCXX/value-dependent-exprs.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/value-dependent-exprs.cpp b/clang/test/SemaCXX/value-dependent-exprs.cpp
new file mode 100644
index 0000000..2017ffa
--- /dev/null
+++ b/clang/test/SemaCXX/value-dependent-exprs.cpp
@@ -0,0 +1,47 @@
+// RUN: %clang_cc1 -verify %s
+
+template <unsigned I>
+class C0 {
+ static const int iv0 = 1 << I;
+
+ enum {
+ A = I,
+ B = I + 1
+ };
+
+ struct s0 {
+ int a : I;
+ int b[I];
+ };
+
+ // FIXME: I'm unclear where the right place to handle this is.
+#if 0
+ void f0(int *p) {
+ if (p == I) {
+ }
+ }
+#endif
+
+#if 0
+ // FIXME: Not sure whether we care about these.
+ void f1(int *a)
+ __attribute__((nonnull(1 + I)))
+ __attribute__((constructor(1 + I)))
+ __attribute__((destructor(1 + I)))
+ __attribute__((sentinel(1 + I, 2 + I))),
+ __attribute__((reqd_work_group_size(1 + I, 2 + I, 3 + I))),
+ __attribute__((format_arg(1 + I))),
+ __attribute__((aligned(1 + I))),
+ __attribute__((regparm(1 + I)));
+
+ typedef int int_a0 __attribute__((address_space(1 + B)));
+#endif
+
+#if 0
+ // FIXME: This doesn't work. PR4996.
+ int f2() {
+ return __builtin_choose_expr(I, 1, 2);
+ }
+#endif
+
+};