| 1 |
// RUN: rm -rf %t && mkdir -p %t |
| 2 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -fdisable-module-hash -fapinotes-modules -I %S/Inputs/Headers %s -ast-dump -ast-dump-filter globalInExternC -x c++ | FileCheck -check-prefix=CHECK-EXTERN-C %s |
| 3 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -fdisable-module-hash -fapinotes-modules -I %S/Inputs/Headers %s -ast-dump -ast-dump-filter globalInExternCXX -x c++ | FileCheck -check-prefix=CHECK-EXTERN-CXX %s |
| 4 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -fdisable-module-hash -fapinotes-modules -I %S/Inputs/Headers %s -ast-dump -ast-dump-filter globalFuncInExternC -x c++ | FileCheck -check-prefix=CHECK-FUNC-EXTERN-C %s |
| 5 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -fdisable-module-hash -fapinotes-modules -I %S/Inputs/Headers %s -ast-dump -ast-dump-filter globalFuncInExternCXX -x c++ | FileCheck -check-prefix=CHECK-FUNC-EXTERN-CXX %s |
| 6 |
|
| 7 |
#include "ExternCtx.h" |
| 8 |
|
| 9 |
// CHECK-EXTERN-C: Dumping globalInExternC: |
| 10 |
// CHECK-EXTERN-C: VarDecl {{.+}} imported in ExternCtx globalInExternC 'int' |
| 11 |
// CHECK-EXTERN-C: UnavailableAttr {{.+}} <<invalid sloc>> "oh no" |
| 12 |
|
| 13 |
// CHECK-EXTERN-CXX: Dumping globalInExternCXX: |
| 14 |
// CHECK-EXTERN-CXX: VarDecl {{.+}} imported in ExternCtx globalInExternCXX 'int' |
| 15 |
// CHECK-EXTERN-CXX: UnavailableAttr {{.+}} <<invalid sloc>> "oh no #2" |
| 16 |
|
| 17 |
// CHECK-FUNC-EXTERN-C: Dumping globalFuncInExternC: |
| 18 |
// CHECK-FUNC-EXTERN-C: FunctionDecl {{.+}} imported in ExternCtx globalFuncInExternC 'void ()' |
| 19 |
// CHECK-FUNC-EXTERN-C: UnavailableAttr {{.+}} <<invalid sloc>> "oh no #3" |
| 20 |
|
| 21 |
// CHECK-FUNC-EXTERN-CXX: Dumping globalFuncInExternCXX: |
| 22 |
// CHECK-FUNC-EXTERN-CXX: FunctionDecl {{.+}} imported in ExternCtx globalFuncInExternCXX 'void ()' |
| 23 |
// CHECK-FUNC-EXTERN-CXX: UnavailableAttr {{.+}} <<invalid sloc>> "oh no #4" |