Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1 | // RUN: %clang_cc1 -ast-print %s | FileCheck %s |
James Molloy | 16f1f71 | 2012-02-29 10:24:19 +0000 | [diff] [blame] | 2 | |
| 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(). |
| 7 | |
| 8 | // CHECK: typedef void (*g)(); |
| 9 | typedef void (*g) (); |
| 10 | // CHECK: enum { |
| 11 | enum { |
| 12 | k = -1 |
| 13 | }; |
| 14 | // CHECK: void f() { |
| 15 | void f() {} |