[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / PCH / attrs.c
blob5a2ce91cc2627ed584501ae0939780b45e71cdd1
1 // Test this without pch.
2 // RUN: %clang_cc1 -include %s -fsyntax-only -verify %s
4 // Test with pch.
5 // RUN: %clang_cc1 -emit-pch -o %t %s
6 // RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s
8 #ifndef HEADER
9 #define HEADER
11 int f(int) __attribute__((visibility("default"), overloadable));
12 int g(int) __attribute__((abi_tag("foo", "bar", "baz"), no_sanitize("address", "memory")));
14 #else
16 float f(float);
17 double f(double); // expected-error{{overloadable}}
18 // expected-note@-2{{previous unmarked overload}}
19 void h(void) { g(0); }
21 #endif