[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / pragma-ms-alloc-text.c
blobff49fa475cd963bb17521c1e045b5174a0f38fda
1 // RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify %s
3 void foo();
4 #pragma alloc_text("hello", foo) // no-error
5 void foo() {}
7 static void foo1();
8 #pragma alloc_text("hello", foo1) // no-error
9 void foo1() {}
11 int foo2;
12 #pragma alloc_text(c, foo2) // expected-error {{'#pragma alloc_text' is applicable only to functions}}