brintos

brintos / llvm-project-archived public Read only

0
0
Text · 910 B · 832729f Raw
18 lines · c
1// Test this without pch.2// RUN: %clang_cc1 -include %S/pragma-weak-functional.h %s -verify -emit-llvm -o - | FileCheck %s3 4// Test with pch.5// RUN: %clang_cc1 -x c-header -emit-pch -o %t %S/pragma-weak-functional.h6// RUN: %clang_cc1 -include-pch %t %s -verify -emit-llvm -o - | FileCheck %s7 8// CHECK-DAG: @undecfunc_alias1 = weak{{.*}} alias void (), ptr @undecfunc9// CHECK-DAG: @undecfunc_alias2 = weak{{.*}} alias void (), ptr @undecfunc10// CHECK-DAG: @undecfunc_alias3 = weak{{.*}} alias void (), ptr @undecfunc11// CHECK-DAG: @undecfunc_alias4 = weak{{.*}} alias void (), ptr @undecfunc12 13///////////// PR28611: Try multiple aliases of same undeclared symbol or alias14void undecfunc_alias1(void);15void 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}}18