[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / PCH / pragma-weak-functional.c
blob832729f1f1bffde6677fd2273e399d2ebad12afe
1 // Test this without pch.
2 // RUN: %clang_cc1 -include %S/pragma-weak-functional.h %s -verify -emit-llvm -o - | FileCheck %s
4 // Test with pch.
5 // RUN: %clang_cc1 -x c-header -emit-pch -o %t %S/pragma-weak-functional.h
6 // RUN: %clang_cc1 -include-pch %t %s -verify -emit-llvm -o - | FileCheck %s
8 // CHECK-DAG: @undecfunc_alias1 = weak{{.*}} alias void (), ptr @undecfunc
9 // CHECK-DAG: @undecfunc_alias2 = weak{{.*}} alias void (), ptr @undecfunc
10 // CHECK-DAG: @undecfunc_alias3 = weak{{.*}} alias void (), ptr @undecfunc
11 // CHECK-DAG: @undecfunc_alias4 = weak{{.*}} alias void (), ptr @undecfunc
13 ///////////// PR28611: Try multiple aliases of same undeclared symbol or alias
14 void undecfunc_alias1(void);
15 void undecfunc(void) { }
16 // expected-warning@pragma-weak-functional.h:4 {{alias will always resolve to undecfunc}}
17 // expected-warning@pragma-weak-functional.h:5 {{alias will always resolve to undecfunc}}