[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / PCH / delayed-template-parsing.cpp
blobb4404c75763439c468f7d2ab77fbe3fecc649966
1 // Check any combination of delayed-template-parsing between PCH and TU works.
2 // RUN: %clang_cc1 %s -emit-pch -o %t.pch
3 // RUN: %clang_cc1 -fdelayed-template-parsing %s -emit-pch -o %t.delayed.pch
4 // RUN: %clang_cc1 -DMAIN_FILE -include-pch %t.pch %s
5 // RUN: %clang_cc1 -DMAIN_FILE -fdelayed-template-parsing -include-pch %t.pch %s
6 // RUN: %clang_cc1 -DMAIN_FILE -include-pch %t.delayed.pch %s
7 // RUN: %clang_cc1 -DMAIN_FILE -fdelayed-template-parsing -include-pch %t.delayed.pch %s
9 #ifndef MAIN_FILE
10 template <typename T>
11 T successor(T Value) { return Value + 1; }
12 #else
13 int x = successor(42);
14 #endif