summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2017-08-09 04:12:17 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2017-08-09 04:12:17 +0000
commit35cb4f84a4b5f9509256ff872f14b1c5dafc41e2 (patch)
tree8db611fed657a9078d072202889d6a390b71621a /clang/test
parent99db3ea6902a3bf86cde37866ba8afd55bada30e (diff)
downloadbcm5719-llvm-35cb4f84a4b5f9509256ff872f14b1c5dafc41e2.tar.gz
bcm5719-llvm-35cb4f84a4b5f9509256ff872f14b1c5dafc41e2.zip
[AST] Cache intermediate visibility/linkage results
This is a follow-up to r310436 with actual functional changes. Please see that commit message for a description of why a cache is appearing here. Suggestions for less-bad ways of testing this are appreciated. :) This fixes PR29160. llvm-svn: 310437
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenCXX/pr29160.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/pr29160.cpp b/clang/test/CodeGenCXX/pr29160.cpp
new file mode 100644
index 00000000000..9c9238e8a0b
--- /dev/null
+++ b/clang/test/CodeGenCXX/pr29160.cpp
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -std=c++11 %s -o /dev/null -S
+//
+// This test's failure mode is running ~forever. (For some value of "forever"
+// that's greater than 25 minutes on my machine)
+
+template <typename... Ts>
+struct Foo {
+ template <typename... T>
+ static void ignore() {}
+ Foo() { ignore<Ts...>(); }
+};
+
+struct Base {
+ Base();
+ ~Base();
+};
+
+#define STAMP(thiz, prev) using thiz = Foo< \
+ prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, \
+ prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, \
+ prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, prev \
+ >;
+STAMP(A, Base);
+STAMP(B, A);
+STAMP(C, B);
+STAMP(D, C);
+STAMP(E, D);
+STAMP(F, E);
+STAMP(G, F);
+STAMP(H, G);
+STAMP(I, H);
+STAMP(J, I);
+STAMP(K, J);
+STAMP(L, K);
+STAMP(M, L);
+STAMP(N, M);
+STAMP(O, N);
+STAMP(P, O);
+STAMP(Q, P);
+
+int main() { Q q; }
OpenPOWER on IntegriCloud