[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / fn-ptr-as-fn-prototype.c
blob0422f2b86ea9b0eeddab35a73b0368a677753487
1 // RUN: %clang_cc1 -ast-print %s | FileCheck %s
3 // This testcase checks the functionality of
4 // Sema::ActOn{Start,End}FunctionDeclarator, specifically checking that
5 // ActOnEndFunctionDeclarator is called after the typedef so the enum
6 // is in the global scope, not the scope of f().
8 // CHECK: typedef void (*g)();
9 typedef void (*g) ();
10 // CHECK: enum
11 enum {
12 k = -1
14 // CHECK: void f() {
15 void f() {}