[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Frontend / ast-main.cpp
blobe6e2825bb332a59e43836f4076a78ff48cbc52e0
1 // RUN: env SDKROOT="/" %clang -emit-llvm -S -o %t1.ll -x c++ - < %s
2 // RUN: env SDKROOT="/" %clang -fno-delayed-template-parsing -emit-ast -o %t.ast %s
3 // RUN: env SDKROOT="/" %clang -emit-llvm -S -o %t2.ll -x ast - < %t.ast
4 // RUN: diff %t1.ll %t2.ll
6 // http://llvm.org/bugs/show_bug.cgi?id=15377
7 template<typename T>
8 struct S {
9 T *mf();
11 template<typename T>
12 T *S<T>::mf() {
13 // warning: non-void function does not return a value [-Wreturn-type]
16 void f() {
17 S<int>().mf();
20 int main() {
21 return 0;