blob: 9dda096531a5b14ddc8bc535528c6f67bf818e86 [file] [log] [blame]
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
typedef void (*NamedFunctionProto)();
struct Struct1
{
NamedFunctionProto named;
void (*unnamed)();
};
extern NamedFunctionProto func1(NamedFunctionProto named, void (*unnamed)(int));
typedef struct
{
} AnonymousStructInTypedef;
// These typerefs do not affect the name of AnonymousStructInTypedef.
typedef AnonymousStructInTypedef Typeref1;
typedef AnonymousStructInTypedef Typeref2;
// Name from global namespace is used.
typedef struct _NamedStructInTypedef
{
} NamedStructInTypedef;
// Both these names must be exlucded or this struct will be generated.
typedef struct _ExcludedStruct
{
} ExcludedStruct;
typedef ExcludedStruct NTyperef1;
// Because `struct _ExcludedStruct` is excluded, the type name used
// in this function (the first function) will be used.
// Therefore, _ExcludedStruct will be generated as NTyperef1.
void func2(NTyperef1 *);
typedef enum
{
a=0
} AnonymousEnumInTypedef;
// Name from global namespace is used.
typedef enum _NamedEnumInTypedef
{
b=0
} NamedEnumInTypedef;