[clang-format] Fix a bug in aligning comments above PPDirective (#72791)
[llvm-project.git] / clang / utils / TestUtils / deep-stack.py
blob4cf5789abdb12b7ae46bb9ddca6bb50a0c7b643a
1 #!/usr/bin/env python
3 from __future__ import absolute_import, division, print_function
6 def pcall(f, N):
7 if N == 0:
8 print(" f(0)", file=f)
9 return
11 print(" f(", file=f)
12 pcall(f, N - 1)
13 print(" )", file=f)
16 def main():
17 f = open("t.c", "w")
18 print("int f(int n) { return n; }", file=f)
19 print("int t() {", file=f)
20 print(" return", file=f)
21 pcall(f, 10000)
22 print(" ;", file=f)
23 print("}", file=f)
26 if __name__ == "__main__":
27 import sys
29 sys.setrecursionlimit(100000)
30 main()