// Test this without pch. // RUN: %clang_cc1 -include %S/pragma-weak-functional.h %s -verify -emit-llvm -o - | FileCheck %s // Test with pch. // RUN: %clang_cc1 -x c-header -emit-pch -o %t %S/pragma-weak-functional.h // RUN: %clang_cc1 -include-pch %t %s -verify -emit-llvm -o - | FileCheck %s // CHECK-DAG: @undecfunc_alias1 = weak{{.*}} alias void (), ptr @undecfunc // CHECK-DAG: @undecfunc_alias2 = weak{{.*}} alias void (), ptr @undecfunc // CHECK-DAG: @undecfunc_alias3 = weak{{.*}} alias void (), ptr @undecfunc // CHECK-DAG: @undecfunc_alias4 = weak{{.*}} alias void (), ptr @undecfunc ///////////// PR28611: Try multiple aliases of same undeclared symbol or alias void undecfunc_alias1(void); void undecfunc(void) { } // expected-warning@pragma-weak-functional.h:4 {{alias will always resolve to undecfunc}} // expected-warning@pragma-weak-functional.h:5 {{alias will always resolve to undecfunc}}