diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:08 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:08 +0000 |
| commit | bab175ec4b075c8076ba14c762900392533f6ee4 (patch) | |
| tree | 01f4f29419a2cb10abe13c1e63cd2a66068b0137 /test/Import | |
| parent | 8b7a8012d223fac5d17d16a66bb39168a9a1dfc0 (diff) | |
Notes
Diffstat (limited to 'test/Import')
| -rw-r--r-- | test/Import/clang-flags/Inputs/S.c | 2 | ||||
| -rw-r--r-- | test/Import/clang-flags/test.c | 5 | ||||
| -rw-r--r-- | test/Import/empty-struct/Inputs/S.c | 2 | ||||
| -rw-r--r-- | test/Import/empty-struct/test.c | 5 | ||||
| -rw-r--r-- | test/Import/error-in-expression/Inputs/S.c | 2 | ||||
| -rw-r--r-- | test/Import/error-in-expression/test.c | 6 | ||||
| -rw-r--r-- | test/Import/error-in-import/Inputs/S.c | 2 | ||||
| -rw-r--r-- | test/Import/error-in-import/test.c | 6 | ||||
| -rw-r--r-- | test/Import/missing-import/test.c | 6 |
9 files changed, 36 insertions, 0 deletions
diff --git a/test/Import/clang-flags/Inputs/S.c b/test/Import/clang-flags/Inputs/S.c new file mode 100644 index 0000000000000..742dac8a35b47 --- /dev/null +++ b/test/Import/clang-flags/Inputs/S.c @@ -0,0 +1,2 @@ +STRUCT S { +}; diff --git a/test/Import/clang-flags/test.c b/test/Import/clang-flags/test.c new file mode 100644 index 0000000000000..7a19ea7ff648d --- /dev/null +++ b/test/Import/clang-flags/test.c @@ -0,0 +1,5 @@ +// RUN: clang-import-test -import %S/Inputs/S.c -expression %s -Xcc -DSTRUCT=struct +void expr() { + STRUCT S MyS; + void *MyPtr = &MyS; +} diff --git a/test/Import/empty-struct/Inputs/S.c b/test/Import/empty-struct/Inputs/S.c new file mode 100644 index 0000000000000..8c90352bc4636 --- /dev/null +++ b/test/Import/empty-struct/Inputs/S.c @@ -0,0 +1,2 @@ +struct S { +}; diff --git a/test/Import/empty-struct/test.c b/test/Import/empty-struct/test.c new file mode 100644 index 0000000000000..d51a69706dcd8 --- /dev/null +++ b/test/Import/empty-struct/test.c @@ -0,0 +1,5 @@ +// RUN: clang-import-test -import %S/Inputs/S.c -expression %s +void expr() { + struct S MyS; + void *MyPtr = &MyS; +} diff --git a/test/Import/error-in-expression/Inputs/S.c b/test/Import/error-in-expression/Inputs/S.c new file mode 100644 index 0000000000000..8c90352bc4636 --- /dev/null +++ b/test/Import/error-in-expression/Inputs/S.c @@ -0,0 +1,2 @@ +struct S { +}; diff --git a/test/Import/error-in-expression/test.c b/test/Import/error-in-expression/test.c new file mode 100644 index 0000000000000..65d3b4a5dcb01 --- /dev/null +++ b/test/Import/error-in-expression/test.c @@ -0,0 +1,6 @@ +// RUN: not clang-import-test -import %S/Inputs/S.c -expression %s 2>&1 | FileCheck %s +// CHECK: {{.*}}no viable conversion{{.*}} +void expr() { + struct S MyS; + void *MyPtr = MyS; +} diff --git a/test/Import/error-in-import/Inputs/S.c b/test/Import/error-in-import/Inputs/S.c new file mode 100644 index 0000000000000..23ca763f6798f --- /dev/null +++ b/test/Import/error-in-import/Inputs/S.c @@ -0,0 +1,2 @@ +struct S [ +]; diff --git a/test/Import/error-in-import/test.c b/test/Import/error-in-import/test.c new file mode 100644 index 0000000000000..197d4e30426a4 --- /dev/null +++ b/test/Import/error-in-import/test.c @@ -0,0 +1,6 @@ +// RUN: not clang-import-test -import %S/Inputs/S.c -expression %s 2>&1 | FileCheck %s +// CHECK: {{.*}}expected unqualified-id{{.*}} +void expr() { + struct S MyS; + void *MyPtr = &MyS; +} diff --git a/test/Import/missing-import/test.c b/test/Import/missing-import/test.c new file mode 100644 index 0000000000000..acf6389cc5fce --- /dev/null +++ b/test/Import/missing-import/test.c @@ -0,0 +1,6 @@ +// RUN: not clang-import-test -import %S/Inputs/S.c -expression %s 2>&1 | FileCheck %s +// CHECK: {{.*}}Couldn't open{{.*}}Inputs/S.c{{.*}} +void expr() { + struct S MyS; + void *MyPtr = &MyS; +} |
