xref: /llvm-project/clang/test/APINotes/broken_types.m (revision 932949dbb517b089af28fdc480a16a738ee5db78)
1// RUN: rm -rf %t && mkdir -p %t
2// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -fapinotes-modules -fsyntax-only -I %S/Inputs/Headers -F %S/Inputs/Frameworks %s 2> %t.err
3// RUN: FileCheck %s < %t.err
4
5#include "BrokenTypes.h"
6
7// CHECK: <API Notes>:1:1: error: unknown type name 'not_a_type'
8// CHECK-NEXT: not_a_type
9// CHECK-NEXT: ^
10
11// CHECK: <API Notes>:1:7: error: unparsed tokens following type
12// CHECK-NEXT: int * with extra junk
13// CHECK-NEXT:       ^
14
15// CHECK: BrokenTypes.h:4:6: error: API notes replacement type 'int *' has a different size from original type 'char'
16
17// CHECK: BrokenTypes.h:6:13: error: API notes replacement type 'double' has a different size from original type 'char'
18
19// CHECK: 5 errors generated.
20